<!DOCTYPE html>
<html>
<head>
  <meta name="baidu-site-verification" content="ZB3UAjDPzn" />
  <meta name="google-site-verification" content="YrN80Ft-as1RRTSUGP2TwhrrwWzjfULH1ViF9sqAS_M" />

  <meta charset="utf-8">
  
  <link rel="stylesheet" href="//cdn.bootcss.com/highlight.js/9.2.0/styles/github.min.css">
  
  
  <meta name="renderer" content="webkit">
  <meta http-equiv="X-UA-Compatible" content="IE=edge" >
  <link rel="dns-prefetch" href="https://mfln8n.coding-pages.com">
  <title>Hexo博客搭建全家桶——不定期更新 | Chthollists的平凡之路</title>
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  <meta name="description" content="利用Hexo搭建的一个Yilia主题静态博客，并对博客进行了美化和功能扩展。 主要功能：文章加密、文章置顶、背景音乐、点击爱心、百度统计、不蒜子统计、SEO优化、百度收录、版权信息、Gitalk评论系统、Live2D">
<meta property="og:type" content="article">
<meta property="og:title" content="Hexo博客搭建全家桶——不定期更新">
<meta property="og:url" content="https://mfln8n.coding-pages.com/post/686a3de0.html">
<meta property="og:site_name" content="Chthollists的平凡之路">
<meta property="og:description" content="利用Hexo搭建的一个Yilia主题静态博客，并对博客进行了美化和功能扩展。 主要功能：文章加密、文章置顶、背景音乐、点击爱心、百度统计、不蒜子统计、SEO优化、百度收录、版权信息、Gitalk评论系统、Live2D">
<meta property="og:locale" content="zh_CN">
<meta property="og:image" content="https://gitee.com/chthollists/PicRepo/raw/master/chtholly/Chtholly06.jpg">
<meta property="article:published_time" content="2020-07-28T12:18:58.000Z">
<meta property="article:modified_time" content="2021-12-26T15:46:40.395Z">
<meta property="article:author" content="Chthollists">
<meta property="article:tag" content="Hexo">
<meta property="article:tag" content="Live2D">
<meta property="article:tag" content="Gitalk">
<meta property="article:tag" content="Git">
<meta property="article:tag" content="SEO">
<meta property="article:tag" content="SiteMap">
<meta property="article:tag" content="Node.js">
<meta name="twitter:card" content="summary">
<meta name="twitter:image" content="https://gitee.com/chthollists/PicRepo/raw/master/chtholly/Chtholly06.jpg">
  
    <link rel="alternative" href="/atom.xml" title="Chthollists的平凡之路" type="application/atom+xml">
  
  
    <link rel="icon" href="/assets/favicon.png">
  
  <link rel="stylesheet" type="text/css" href="/./main.0cf68a.css">
  
	<link rel="stylesheet" type="text/css" href="/./avatarrotation.css">

  <style type="text/css">
  
    #container.show {
      background: linear-gradient(200deg,#a0cfe4,#e8c37e);
    }
  </style>
  

  
<script>
var _hmt = _hmt || [];
(function() {
	var hm = document.createElement("script");
	hm.src = "https://hm.baidu.com/hm.js?true";
	var s = document.getElementsByTagName("script")[0]; 
	s.parentNode.insertBefore(hm, s);
})();
</script>



<script>
var _hmt = _hmt || [];
(function() {
  var hm = document.createElement("script");
  hm.src = "https://hm.baidu.com/hm.js?0113964bae57c4e8dcc0a90d835680c4";
  var s = document.getElementsByTagName("script")[0]; 
  s.parentNode.insertBefore(hm, s);
})();
</script>

<meta name="generator" content="Hexo 4.2.1"></head>

<body>
  <div id="container" q-class="show:isCtnShow">
    <canvas id="anm-canvas" class="anm-canvas"></canvas>
    <div class="left-col" q-class="show:isShow">
      


<!--注释: <div class="overlay" style="background: #4d4d4d"></div> -->

 <div class="overlay" style="#4d4d4d"></div>
<div class="intrude-less">
	<header id="header" class="inner">
		<a href="/" class="profilepic">
			<img src="/assets/avatar.jpg" class="js-avatar">
		</a>
		<hgroup>
		  <h1 class="header-author"><a href="/">Chthollists</a></h1>
		</hgroup>
		
		<p class="header-subtitle">技术博客 研发小白</p>
		

		<nav class="header-menu">
			<ul>
			
				<li><a href="/">主页</a></li>
	        
				<li><a href="/archives/index.html">归档</a></li>
	        
				<li><a href="/tags">标签</a></li>
	        
				<li><a href="/categories/essays">随笔</a></li>
	        
				<li><a href="/tags/Encrypt">限权</a></li>
	        
				<li><a href="/categories/Java">Java</a></li>
	        
				<li><a href="/categories/Python">Python</a></li>
	        
				<li><a href="/categories/Algorithm">算法</a></li>
	        
				<li><a href="/categories/CodeRecord">码录</a></li>
	        
				<li><a href="/categories/Frame">框架</a></li>
	        
				<li><a href="/categories/Middleware">中间件</a></li>
	        
				<li><a href="/categories/Interview">面试</a></li>
	        
				<li><a href="/categories/Technology">技术</a></li>
	        
				<li><a href="/categories/others/Hexo">Hexo</a></li>
	        
			</ul>
		</nav>

		
		<nav class="header-smart-menu">
    		
    			
    			<a q-on="click: openSlider(e, 'innerArchive')" href="javascript:void(0)">所有文章</a>
    			
            
    			
    			<a q-on="click: openSlider(e, 'friends')" href="javascript:void(0)">友链</a>
    			
            
    			
    			<a q-on="click: openSlider(e, 'aboutme')" href="javascript:void(0)">个性签名</a>
    			
            
		</nav>
		
		<!-- # <nav>
				Total: 48
			</nav> -->
			
		
		<nav class="header-nav">
			<div class="social">
				
					<a class="github" target="_blank" href="https://github.com/Chthollists" title="github"><i class="icon-github"></i></a>
		        
					<a class="qq" target="_blank" href="/assets/qq.jpg" title="qq"><i class="icon-qq"></i></a>
		        
					<a class="weixin" target="_blank" href="/assets/wechat.jpg" title="weixin"><i class="icon-weixin"></i></a>
		        
					<a class="bilibili" target="_blank" href="https://space.bilibili.com/2030799" title="bilibili"><i class="icon-bilibili"></i></a>
		        
					<a class="mail" target="_blank" href="mailto:amedeusmaho@163.com" title="mail"><i class="icon-mail"></i></a>
		        
			</div>
				<!-- 网易云音乐插件 -->
				
				<div style="position:absolute; bottom:120px left:auto; width:85%">
					<iframe frameborder="no" border="0" marginwidth="0" marginheight="0" width=218 height=52 src="//music.163.com/outchain/player?type=4&id=349623778&auto=0&height=32"></iframe>
				</div>
				
		</nav>
		
		
		
	</header>		
</div>

    </div>
    <div class="mid-col" q-class="show:isShow,hide:isShow|isFalse">
      
<nav id="mobile-nav">
  	<div class="overlay js-overlay" style="background: #4d4d4d"></div>
	<div class="btnctn js-mobile-btnctn">
  		<div class="slider-trigger list" q-on="click: openSlider(e)"><i class="icon icon-sort"></i></div>
	</div>
	<div class="intrude-less">
		<header id="header" class="inner">
			<div class="profilepic">
				<img src="/assets/avatar.jpg" class="js-avatar">
			</div>
			<hgroup>
			  <h1 class="header-author js-header-author">Chthollists</h1>
			</hgroup>
			
			<p class="header-subtitle"><i class="icon icon-quo-left"></i>技术博客 研发小白<i class="icon icon-quo-right"></i></p>
			
			
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
				
			
			
			
			<nav class="header-nav">
				<div class="social">
					
						<a class="github" target="_blank" href="https://github.com/Chthollists" title="github"><i class="icon-github"></i></a>
			        
						<a class="qq" target="_blank" href="/assets/qq.jpg" title="qq"><i class="icon-qq"></i></a>
			        
						<a class="weixin" target="_blank" href="/assets/wechat.jpg" title="weixin"><i class="icon-weixin"></i></a>
			        
						<a class="bilibili" target="_blank" href="https://space.bilibili.com/2030799" title="bilibili"><i class="icon-bilibili"></i></a>
			        
						<a class="mail" target="_blank" href="mailto:amedeusmaho@163.com" title="mail"><i class="icon-mail"></i></a>
			        
				</div>
			</nav>

			<nav class="header-menu js-header-menu">
				<ul style="width: 70%">
				
				
					<li style="width: 7.142857142857143%"><a href="/">主页</a></li>
		        
					<li style="width: 7.142857142857143%"><a href="/archives/index.html">归档</a></li>
		        
					<li style="width: 7.142857142857143%"><a href="/tags">标签</a></li>
		        
					<li style="width: 7.142857142857143%"><a href="/categories/essays">随笔</a></li>
		        
					<li style="width: 7.142857142857143%"><a href="/tags/Encrypt">限权</a></li>
		        
					<li style="width: 7.142857142857143%"><a href="/categories/Java">Java</a></li>
		        
					<li style="width: 7.142857142857143%"><a href="/categories/Python">Python</a></li>
		        
					<li style="width: 7.142857142857143%"><a href="/categories/Algorithm">算法</a></li>
		        
					<li style="width: 7.142857142857143%"><a href="/categories/CodeRecord">码录</a></li>
		        
					<li style="width: 7.142857142857143%"><a href="/categories/Frame">框架</a></li>
		        
					<li style="width: 7.142857142857143%"><a href="/categories/Middleware">中间件</a></li>
		        
					<li style="width: 7.142857142857143%"><a href="/categories/Interview">面试</a></li>
		        
					<li style="width: 7.142857142857143%"><a href="/categories/Technology">技术</a></li>
		        
					<li style="width: 7.142857142857143%"><a href="/categories/others/Hexo">Hexo</a></li>
		        
				</ul>
			</nav>
		</header>				
	</div>
	<div class="mobile-mask" style="display:none" q-show="isShow"></div>
</nav>

      <div id="wrapper" class="body-wrap">
        <div class="menu-l">
          <div class="canvas-wrap">
            <canvas data-colors="#eaeaea" data-sectionHeight="100" data-contentId="js-content" id="myCanvas1" class="anm-canvas"></canvas>
          </div>
          <div id="js-content" class="content-ll">
            
  <i class="fa fa-thumb-tack"></i>
  <font color=7D26CD>置顶</font>
  <span class="post-meta-divider">|</span>

<article id="post-Hexo/HexoBlog-Summary" class="article article-type-post " itemscope itemprop="blogPost">
  <div class="article-inner">
    
      <header class="article-header">
        
  
    <h1 class="article-title" itemprop="name">
      Hexo博客搭建全家桶——不定期更新
    </h1>
  

		
		<!--显示阅读次数-->
		
		<br/>
		<a class="cloud-tie-join-count" href="javascript:void(0);" style="color:red;font-size:18px;">
		<b><span class="icon-sort"></span></b>
		<font face="Microsoft YaHei"><b><span id="busuanzi_container_page_pv" style="color:#ef7522;font-size:18px;">
            浏览次数 : <font face="Times New Roman"><span id="busuanzi_value_page_pv"></span>&nbsp;次 &nbsp;&nbsp;
		</span></b></font></font>	
		</a>
		
		<!--显示阅读次数完毕-->

        
        <a href="/post/686a3de0.html" class="archive-article-date">
  	<time datetime="2020-07-28T12:18:58.000Z" itemprop="datePublished"><i class="icon-calendar icon"></i>2020-07-28</time>
</a>
		
        <!-- 需要添加的位置 -->
        <!-- 开始添加字数统计-->
        
          <div style="margin-top:10px;">
    <span class="post-time">
      <span class="post-meta-item-icon">
        <i class="fa fa-keyboard-o"></i>
        <font face= "Microsoft YaHei"><b><span class="post-meta-item-text" style="font-size: 16px;color: purple">  博文字数统计 : </span></b></font>
        <!--自定义样式-->
        <font face= "Microsoft YaHei"><b><span class="post-count" style="font-size: 16px;color: blue">13.9k字</span>
      </span></b></font>
    </span>

    <span class="post-time">
      &nbsp; | &nbsp;
      <span class="post-meta-item-icon">
        <i class="fa fa-hourglass-half"></i>
        <font face= "Microsoft YaHei"><b><span class="post-meta-item-text" style="font-size: 16px;color: purple">  阅读所需时长 : </span></b></font>
        <font face= "Microsoft YaHei"><b><span class="post-count" style="font-size: 16px;color: red">65分</span>
      </span></b></font>
    </span>
</div>
          
        <!-- 添加完成 -->
		
		
		
      </header>
    
	
	
<!-- 目录内容 -->

    <p class="show-toc-btn" id="show-toc-btn" onclick="showToc();" style="display:none">
          <span class="btn-bg"></span>
          <span class="btn-text">文章导航</span>
          </p>
	<div id="toc-article" class="toc-article">
	    <span id="toc-close" class="toc-close" title="隐藏导航" onclick="showBtn();">×</span>
		<strong class="toc-title">文章目录</strong>
           <ol class="toc"><li class="toc-item toc-level-1"><a class="toc-link" href="#Hexo博客搭建全家桶——不定期更新"><span class="toc-number">1.</span> <span class="toc-text">Hexo博客搭建全家桶——不定期更新</span></a><ol class="toc-child"><li class="toc-item toc-level-2"><a class="toc-link" href="#一、博客分类及搭建工具"><span class="toc-number">1.1.</span> <span class="toc-text">一、博客分类及搭建工具</span></a><ol class="toc-child"><li class="toc-item toc-level-3"><a class="toc-link" href="#1-动态博客-Dynamic-Blog"><span class="toc-number">1.1.1.</span> <span class="toc-text">1. 动态博客 Dynamic Blog</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#2-静态博客-Static-blog"><span class="toc-number">1.1.2.</span> <span class="toc-text">2. 静态博客 Static blog</span></a><ol class="toc-child"><li class="toc-item toc-level-4"><a class="toc-link" href="#2-1-静态博客框架"><span class="toc-number">1.1.2.1.</span> <span class="toc-text">2.1 静态博客框架</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#2-2-服务器"><span class="toc-number">1.1.2.2.</span> <span class="toc-text">2.2 服务器</span></a></li></ol></li></ol></li><li class="toc-item toc-level-2"><a class="toc-link" href="#二、Git与Github"><span class="toc-number">1.2.</span> <span class="toc-text">二、Git与Github</span></a><ol class="toc-child"><li class="toc-item toc-level-3"><a class="toc-link" href="#1-Git安装与配置"><span class="toc-number">1.2.1.</span> <span class="toc-text">1. Git安装与配置</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#2-Git创建仓库及管理"><span class="toc-number">1.2.2.</span> <span class="toc-text">2. Git创建仓库及管理</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#3-Git远程仓库"><span class="toc-number">1.2.3.</span> <span class="toc-text">3. Git远程仓库</span></a></li></ol></li><li class="toc-item toc-level-2"><a class="toc-link" href="#三、利用Hexo搭建博客"><span class="toc-number">1.3.</span> <span class="toc-text">三、利用Hexo搭建博客</span></a><ol class="toc-child"><li class="toc-item toc-level-3"><a class="toc-link" href="#1-准备工作-Nodejs-amp-Git"><span class="toc-number">1.3.1.</span> <span class="toc-text">1. 准备工作 Nodejs &amp; Git</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#2-Hexo安装及配置"><span class="toc-number">1.3.2.</span> <span class="toc-text">2. Hexo安装及配置</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#3-博客部署到远端服务器"><span class="toc-number">1.3.3.</span> <span class="toc-text">3. 博客部署到远端服务器</span></a></li></ol></li><li class="toc-item toc-level-2"><a class="toc-link" href="#四、博客设置美化"><span class="toc-number">1.4.</span> <span class="toc-text">四、博客设置美化</span></a><ol class="toc-child"><li class="toc-item toc-level-3"><a class="toc-link" href="#1-主题更换-：Yilia"><span class="toc-number">1.4.1.</span> <span class="toc-text">1. 主题更换 ：Yilia</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#2-配置图片资源和链接资源"><span class="toc-number">1.4.2.</span> <span class="toc-text">2. 配置图片资源和链接资源</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#3-博客文章美化设置"><span class="toc-number">1.4.3.</span> <span class="toc-text">3. 博客文章美化设置</span></a><ol class="toc-child"><li class="toc-item toc-level-4"><a class="toc-link" href="#3-1-显示文章摘要"><span class="toc-number">1.4.3.1.</span> <span class="toc-text">3.1 显示文章摘要</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#3-2-显示文章目录TOC"><span class="toc-number">1.4.3.2.</span> <span class="toc-text">3.2 显示文章目录TOC</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#3-3-增加归档菜单"><span class="toc-number">1.4.3.3.</span> <span class="toc-text">3.3 增加归档菜单</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#3-4-美化目录"><span class="toc-number">1.4.3.4.</span> <span class="toc-text">3.4 美化目录</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#3-5-字体美化"><span class="toc-number">1.4.3.5.</span> <span class="toc-text">3.5 字体美化</span></a></li></ol></li><li class="toc-item toc-level-3"><a class="toc-link" href="#4-博客主页美化"><span class="toc-number">1.4.4.</span> <span class="toc-text">4. 博客主页美化</span></a><ol class="toc-child"><li class="toc-item toc-level-4"><a class="toc-link" href="#4-1-修改博客标题、子标题、用户"><span class="toc-number">1.4.4.1.</span> <span class="toc-text">4.1 修改博客标题、子标题、用户</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#4-2-主页左侧显示文章总数"><span class="toc-number">1.4.4.2.</span> <span class="toc-text">4.2 主页左侧显示文章总数</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#4-3-设置个性签名"><span class="toc-number">1.4.4.3.</span> <span class="toc-text">4.3 设置个性签名</span></a></li></ol></li></ol></li><li class="toc-item toc-level-2"><a class="toc-link" href="#五、高级功能实现"><span class="toc-number">1.5.</span> <span class="toc-text">五、高级功能实现</span></a><ol class="toc-child"><li class="toc-item toc-level-3"><a class="toc-link" href="#1-微信分享功能"><span class="toc-number">1.5.1.</span> <span class="toc-text">1. 微信分享功能</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#2-文章置顶功能"><span class="toc-number">1.5.2.</span> <span class="toc-text">2. 文章置顶功能</span></a><ol class="toc-child"><li class="toc-item toc-level-4"><a class="toc-link" href="#2-1-安装插件"><span class="toc-number">1.5.2.1.</span> <span class="toc-text">2.1 安装插件</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#2-2-配置置顶标准"><span class="toc-number">1.5.2.2.</span> <span class="toc-text">2.2 配置置顶标准</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#2-3-配置文章"><span class="toc-number">1.5.2.3.</span> <span class="toc-text">2.3 配置文章</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#2-4-优先级配置"><span class="toc-number">1.5.2.4.</span> <span class="toc-text">2.4 优先级配置</span></a></li></ol></li><li class="toc-item toc-level-3"><a class="toc-link" href="#3-文章标签分类功能"><span class="toc-number">1.5.3.</span> <span class="toc-text">3. 文章标签分类功能</span></a><ol class="toc-child"><li class="toc-item toc-level-4"><a class="toc-link" href="#3-1-文章分类功能"><span class="toc-number">1.5.3.1.</span> <span class="toc-text">3.1 文章分类功能</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#3-2-文章标签分类功能"><span class="toc-number">1.5.3.2.</span> <span class="toc-text">3.2 文章标签分类功能</span></a></li></ol></li><li class="toc-item toc-level-3"><a class="toc-link" href="#4-添加404网页"><span class="toc-number">1.5.4.</span> <span class="toc-text">4. 添加404网页</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#5-头像旋转功能"><span class="toc-number">1.5.5.</span> <span class="toc-text">5. 头像旋转功能</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#6-修改默认文章格式"><span class="toc-number">1.5.6.</span> <span class="toc-text">6. 修改默认文章格式</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#7-不蒜子统计功能"><span class="toc-number">1.5.7.</span> <span class="toc-text">7. 不蒜子统计功能</span></a><ol class="toc-child"><li class="toc-item toc-level-4"><a class="toc-link" href="#7-1-安装不蒜子统计脚本"><span class="toc-number">1.5.7.1.</span> <span class="toc-text">7.1 安装不蒜子统计脚本</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#7-2-博客访问量统计"><span class="toc-number">1.5.7.2.</span> <span class="toc-text">7.2 博客访问量统计</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#7-3-单篇文章点击量统计方法一"><span class="toc-number">1.5.7.3.</span> <span class="toc-text">7.3 单篇文章点击量统计方法一</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#7-4-单篇文章点击量统计方法二"><span class="toc-number">1.5.7.4.</span> <span class="toc-text">7.4 单篇文章点击量统计方法二</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#7-5-不蒜子统计与Live2D冲突问题"><span class="toc-number">1.5.7.5.</span> <span class="toc-text">7.5 不蒜子统计与Live2D冲突问题</span></a></li></ol></li><li class="toc-item toc-level-3"><a class="toc-link" href="#8-字数统计和阅读时长功能"><span class="toc-number">1.5.8.</span> <span class="toc-text">8. 字数统计和阅读时长功能</span></a><ol class="toc-child"><li class="toc-item toc-level-4"><a class="toc-link" href="#8-1-字数统计"><span class="toc-number">1.5.8.1.</span> <span class="toc-text">8.1 字数统计</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#8-2-阅读时长统计"><span class="toc-number">1.5.8.2.</span> <span class="toc-text">8.2 阅读时长统计</span></a></li></ol></li><li class="toc-item toc-level-3"><a class="toc-link" href="#9-背景音乐功能"><span class="toc-number">1.5.9.</span> <span class="toc-text">9. 背景音乐功能</span></a><ol class="toc-child"><li class="toc-item toc-level-4"><a class="toc-link" href="#9-1-文章内音乐"><span class="toc-number">1.5.9.1.</span> <span class="toc-text">9.1 文章内音乐</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#9-2-主页背景音乐"><span class="toc-number">1.5.9.2.</span> <span class="toc-text">9.2 主页背景音乐</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#9-3-遗留问题-未解决"><span class="toc-number">1.5.9.3.</span> <span class="toc-text">9.3 遗留问题(未解决)</span></a></li></ol></li><li class="toc-item toc-level-3"><a class="toc-link" href="#10-文章加密功能"><span class="toc-number">1.5.10.</span> <span class="toc-text">10. 文章加密功能</span></a><ol class="toc-child"><li class="toc-item toc-level-4"><a class="toc-link" href="#10-1-引入加密插件"><span class="toc-number">1.5.10.1.</span> <span class="toc-text">10.1 引入加密插件</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#10-2-修改配置"><span class="toc-number">1.5.10.2.</span> <span class="toc-text">10.2 修改配置</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#10-3-修改MD文章开头属性"><span class="toc-number">1.5.10.3.</span> <span class="toc-text">10.3 修改MD文章开头属性</span></a></li></ol></li><li class="toc-item toc-level-3"><a class="toc-link" href="#11-版权信息功能"><span class="toc-number">1.5.11.</span> <span class="toc-text">11. 版权信息功能</span></a><ol class="toc-child"><li class="toc-item toc-level-4"><a class="toc-link" href="#11-1-直接修改版"><span class="toc-number">1.5.11.1.</span> <span class="toc-text">11.1 直接修改版</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#11-2-新建文件版"><span class="toc-number">1.5.11.2.</span> <span class="toc-text">11.2 新建文件版</span></a></li></ol></li><li class="toc-item toc-level-3"><a class="toc-link" href="#12-爱心、光玉特效功能"><span class="toc-number">1.5.12.</span> <span class="toc-text">12. 爱心、光玉特效功能</span></a><ol class="toc-child"><li class="toc-item toc-level-4"><a class="toc-link" href="#12-1-点击爱心"><span class="toc-number">1.5.12.1.</span> <span class="toc-text">12.1 点击爱心</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#12-2-光玉特效"><span class="toc-number">1.5.12.2.</span> <span class="toc-text">12.2 光玉特效</span></a></li></ol></li><li class="toc-item toc-level-3"><a class="toc-link" href="#13-SEO优化"><span class="toc-number">1.5.13.</span> <span class="toc-text">13. SEO优化</span></a><ol class="toc-child"><li class="toc-item toc-level-4"><a class="toc-link" href="#13-1-加密文章URL"><span class="toc-number">1.5.13.1.</span> <span class="toc-text">13.1 加密文章URL</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#13-2-添加站点地图SiteMap"><span class="toc-number">1.5.13.2.</span> <span class="toc-text">13.2 添加站点地图SiteMap</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#13-3-注册百度站长平台"><span class="toc-number">1.5.13.3.</span> <span class="toc-text">13.3 注册百度站长平台</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#13-4-针对百度搜索引擎的优化"><span class="toc-number">1.5.13.4.</span> <span class="toc-text">13.4 针对百度搜索引擎的优化</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#13-5-网站结构自身优化"><span class="toc-number">1.5.13.5.</span> <span class="toc-text">13.5 网站结构自身优化</span></a></li></ol></li><li class="toc-item toc-level-3"><a class="toc-link" href="#14-百度推送收录功能"><span class="toc-number">1.5.14.</span> <span class="toc-text">14. 百度推送收录功能</span></a><ol class="toc-child"><li class="toc-item toc-level-4"><a class="toc-link" href="#14-1-新增博客文章页面自动推送"><span class="toc-number">1.5.14.1.</span> <span class="toc-text">14.1 新增博客文章页面自动推送</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#14-2-主动推送"><span class="toc-number">1.5.14.2.</span> <span class="toc-text">14.2 主动推送</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#14-3-自动推送"><span class="toc-number">1.5.14.3.</span> <span class="toc-text">14.3 自动推送</span></a></li></ol></li><li class="toc-item toc-level-3"><a class="toc-link" href="#15-百度统计功能"><span class="toc-number">1.5.15.</span> <span class="toc-text">15. 百度统计功能</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#16-评论系统"><span class="toc-number">1.5.16.</span> <span class="toc-text">16. 评论系统</span></a><ol class="toc-child"><li class="toc-item toc-level-4"><a class="toc-link" href="#16-1-注册Leancloud"><span class="toc-number">1.5.16.1.</span> <span class="toc-text">16.1 注册Leancloud</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#16-2-修改配置文件"><span class="toc-number">1.5.16.2.</span> <span class="toc-text">16.2 修改配置文件</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#16-3-Gitalk评论系统"><span class="toc-number">1.5.16.3.</span> <span class="toc-text">16.3 Gitalk评论系统</span></a></li></ol></li><li class="toc-item toc-level-3"><a class="toc-link" href="#17-Live-2D功能"><span class="toc-number">1.5.17.</span> <span class="toc-text">17. Live 2D功能</span></a><ol class="toc-child"><li class="toc-item toc-level-4"><a class="toc-link" href="#17-1-下载插件和模型"><span class="toc-number">1.5.17.1.</span> <span class="toc-text">17.1  下载插件和模型</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#17-2-更改模型路径"><span class="toc-number">1.5.17.2.</span> <span class="toc-text">17.2 更改模型路径</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#17-3-添加配置"><span class="toc-number">1.5.17.3.</span> <span class="toc-text">17.3 添加配置</span></a></li></ol></li><li class="toc-item toc-level-3"><a class="toc-link" href="#18-其他功能"><span class="toc-number">1.5.18.</span> <span class="toc-text">18. 其他功能</span></a><ol class="toc-child"><li class="toc-item toc-level-4"><a class="toc-link" href="#18-1-图床"><span class="toc-number">1.5.18.1.</span> <span class="toc-text">18.1 图床</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#18-2-RSS"><span class="toc-number">1.5.18.2.</span> <span class="toc-text">18.2 RSS</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#18-3-一言API个性签名自动刷新"><span class="toc-number">1.5.18.3.</span> <span class="toc-text">18.3 一言API个性签名自动刷新</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#18-4-Google收录"><span class="toc-number">1.5.18.4.</span> <span class="toc-text">18.4 Google收录</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#18-5-Google广告投放"><span class="toc-number">1.5.18.5.</span> <span class="toc-text">18.5 Google广告投放</span></a></li></ol></li></ol></li><li class="toc-item toc-level-2"><a class="toc-link" href="#附录：参考资料"><span class="toc-number">1.6.</span> <span class="toc-text">附录：参考资料</span></a></li></ol></li></ol>
         </div>
   <script type="text/javascript">
	function showToc(){
		var toc_article = document.getElementById("toc-article");
		var show_toc_btn = document.getElementById("show-toc-btn");
		toc_article.setAttribute("style","display:block");
		show_toc_btn.setAttribute("style","display:none");
		};
	function showBtn(){
		var toc_article = document.getElementById("toc-article");
		var show_toc_btn = document.getElementById("show-toc-btn");
		toc_article.setAttribute("style","display:none");
		show_toc_btn.setAttribute("style","display:block");
		};
   </script>
      
<!-- 目录内容结束 -->
	
    <div class="article-entry" itemprop="articleBody">
	
<!-- 标签云和分类云 -->	
			

				
					<hr>
<ul>
<li>利用Hexo搭建的一个Yilia主题静态博客，并对博客进行了美化和功能扩展。</li>
<li>主要功能：文章加密、文章置顶、背景音乐、点击爱心、百度统计、不蒜子统计、SEO优化、百度收录、版权信息、Gitalk评论系统、Live2D</li>
</ul>
<p><img src="https://gitee.com/chthollists/PicRepo/raw/master/chtholly/Chtholly06.jpg" alt="Chtholly"></p>
<a id="more"></a>

<h1 id="Hexo博客搭建全家桶——不定期更新"><a href="#Hexo博客搭建全家桶——不定期更新" class="headerlink" title="Hexo博客搭建全家桶——不定期更新"></a>Hexo博客搭建全家桶——不定期更新</h1><hr>
<h2 id="一、博客分类及搭建工具"><a href="#一、博客分类及搭建工具" class="headerlink" title="一、博客分类及搭建工具"></a>一、博客分类及搭建工具</h2><blockquote>
<p>目前，主流的博客主要分静态博客和动态博客两类：</p>
<p>所谓动态，就是指有前端有后端，可以登录到后台进行管理。静态博客是纯前端的展示，没有后端。</p>
</blockquote>
<h3 id="1-动态博客-Dynamic-Blog"><a href="#1-动态博客-Dynamic-Blog" class="headerlink" title="1. 动态博客 Dynamic Blog"></a>1. 动态博客 Dynamic Blog</h3><ul>
<li><p>简书、CSDN、知乎、博客园、掘金等动态博客公共平台上搭建博客</p>
<ul>
<li>优点：简单</li>
<li>缺点：受到平台的限制</li>
</ul>
</li>
<li><p>WordPress框架</p>
<blockquote>
<p>使用WordPress等成熟框架搭建动态博客 + 服务器部署</p>
<p><a href="https://wordpress.org/" target="_blank" rel="noopener">WordPress官网</a></p>
</blockquote>
<ul>
<li><p>基于PHP</p>
</li>
<li><p>优点：相对简单</p>
</li>
<li><p>缺点：笨重</p>
</li>
</ul>
</li>
<li><p>前后端开发自行搭建</p>
<blockquote>
<p>使用 Java、PHP、Python等语言开发属于自己的动态博客 + 服务器部署</p>
</blockquote>
<ul>
<li>优点：功能强大</li>
<li>缺点：难度大</li>
</ul>
</li>
</ul>
<hr>
<h3 id="2-静态博客-Static-blog"><a href="#2-静态博客-Static-blog" class="headerlink" title="2. 静态博客 Static blog"></a>2. 静态博客 Static blog</h3><h4 id="2-1-静态博客框架"><a href="#2-1-静态博客框架" class="headerlink" title="2.1 静态博客框架"></a>2.1 静态博客框架</h4><blockquote>
<p>轻量级、快速</p>
</blockquote>
<ul>
<li><p>Hexo</p>
<ul>
<li><p><a href="https://hexo.io/" target="_blank" rel="noopener">Hexo官网</a></p>
</li>
<li><p>基于 JavaScript</p>
</li>
<li><p>Node.js</p>
</li>
</ul>
</li>
<li><p>Jekyllrb</p>
<ul>
<li><p><a href="https://jekyllrb.com/" target="_blank" rel="noopener">Jekyllrb官网</a></p>
</li>
<li><p>配置环境：Ruby、RubyGems、Node.js</p>
</li>
</ul>
</li>
<li><p>Hugo</p>
<ul>
<li><p><a href="https://www.gohugo.org/" target="_blank" rel="noopener">Hugo官网</a></p>
</li>
<li><p>基于Go</p>
</li>
</ul>
</li>
<li><p>VuePress</p>
<ul>
<li><p><a href="https://vuepress.vuejs.org/zh/guide/" target="_blank" rel="noopener">VuePres官网</a></p>
</li>
<li><p>基于Vue.js</p>
</li>
<li><p>配置环境： <a href="http://vuejs.org/" target="_blank" rel="noopener">Vue</a>、<a href="https://github.com/vuejs/vue-router" target="_blank" rel="noopener">Vue Router</a> 、<a href="http://webpack.js.org/" target="_blank" rel="noopener">webpack</a></p>
</li>
</ul>
</li>
<li><p>Solo</p>
<ul>
<li><a href="https://solo.b3log.org/" target="_blank" rel="noopener">Solo官网</a></li>
</ul>
</li>
<li><p>基于Java</p>
<ul>
<li>配置环境：JDK</li>
</ul>
</li>
</ul>
<h4 id="2-2-服务器"><a href="#2-2-服务器" class="headerlink" title="2.2 服务器"></a>2.2 服务器</h4><ul>
<li><p>托管在GitHub、Coding、Gitee码云等公共平台</p>
<ul>
<li>优点：免费、简便</li>
<li>缺点：访问速度慢、Github限制百度爬虫，不方便实现SEO优化</li>
</ul>
</li>
<li><p>自己搭建云服务器</p>
<blockquote>
<p><a href="https://mp.weixin.qq.com/s?sn=8009155566a3f5cd3e46b4052a047f73&idx=1&mid=2247483706&lang=zh_CN&__biz=MzUzMTA2Njk3Mw%3D%3D&chksm=fa497808cd3ef11ea8ba66a60bb131716b8278fcd1bf3105cf67c988b367d110089af453736c&token=55710950&bili_only=0#rd" target="_blank" rel="noopener">Hexo+阿里云教程</a></p>
</blockquote>
<ul>
<li>优点：访问速度快、独立域名、自主可控</li>
<li>缺点：域名和云服务器均付费</li>
</ul>
</li>
</ul>
<hr>
<hr>
<h2 id="二、Git与Github"><a href="#二、Git与Github" class="headerlink" title="二、Git与Github"></a>二、Git与Github</h2><ul>
<li><p>教程</p>
<blockquote>
<p><a href="https://www.liaoxuefeng.com/" target="_blank" rel="noopener">Git教程——廖雪峰</a></p>
<p><a href="https://blog.csdn.net/qq_39387475/article/details/84996173" target="_blank" rel="noopener">Git教程</a></p>
</blockquote>
</li>
</ul>
<h3 id="1-Git安装与配置"><a href="#1-Git安装与配置" class="headerlink" title="1. Git安装与配置"></a>1. Git安装与配置</h3><ul>
<li><p>Git 分布式版本控制系统原理</p>
<blockquote>
<p>版本控制系统，其实只能跟踪文本文件的改动，比如TXT文件，网页，所有的程序代码等等，无法追踪图片、音频、视频等的改动。</p>
</blockquote>
<ul>
<li><p>工作区(Working Directory)：就是电脑本地看到的目录。</p>
</li>
<li><p>暂存区：英文叫stage, 或index。</p>
<blockquote>
<p>一般存放在 “.git目录下” 下的index文件（.git/index）中，所以我们把暂存区有时也叫作索引（index）。</p>
</blockquote>
</li>
<li><p>版本库(Repository)：工作区有一个隐藏目录.git，这个不算工作区，而是Git的版本库。</p>
</li>
</ul>
</li>
<li><p>安装包下载</p>
<blockquote>
<p><a href="https://git-scm.com/downloads" target="_blank" rel="noopener">Git官网</a></p>
</blockquote>
</li>
<li><p>在Git bash中配置本地用户名及邮箱</p>
<blockquote>
<p>如果用了 –global 选项，那么更改的配置文件就是位于你用户主目录下的那个，以后你所有的项目都会默认使用这里配置的用户信息。</p>
<p>如果要在某个特定的项目中使用其他名字或者电邮，只要去掉 –global 选项重新配置即可，新的设定保存在当前项目的 .git/config 文件里。</p>
</blockquote>
<blockquote>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># 查看配置</span></span><br><span class="line">git config --list ：</span><br><span class="line"><span class="comment"># 设置全局用户名</span></span><br><span class="line">git config --global user.name <span class="string">"your name"</span>   </span><br><span class="line"><span class="comment"># 设置全局邮箱</span></span><br><span class="line">git config --global user.email <span class="string">"your email"</span> </span><br><span class="line"><span class="comment"># 查看本目录下仓库的用户名</span></span><br><span class="line"> git config user.name</span><br><span class="line"><span class="comment"># 修改本目录下仓库的用户名</span></span><br><span class="line">git config user.name <span class="string">"用户名"</span></span><br><span class="line"><span class="comment"># 查看本目录下仓库的邮箱 ；</span></span><br><span class="line">git config user.email </span><br><span class="line"><span class="comment"># 修改本目录下仓库的邮箱 ； </span></span><br><span class="line">git config user.email <span class="string">"邮箱"</span>   </span><br></pre></td></tr></table></figure>
</blockquote>
</li>
<li><p>编辑、删除全局配置</p>
<blockquote>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># 删除全局配置，终端执行命令</span></span><br><span class="line">git config --global --<span class="built_in">unset</span> user.name</span><br><span class="line"></span><br><span class="line"><span class="comment"># 编辑配置文件</span></span><br><span class="line">git config --global --edit</span><br></pre></td></tr></table></figure>
</blockquote>
</li>
</ul>
<hr>
<h3 id="2-Git创建仓库及管理"><a href="#2-Git创建仓库及管理" class="headerlink" title="2. Git创建仓库及管理"></a>2. Git创建仓库及管理</h3><blockquote>
<p>所有命令均在Git bash 命令行中完成 $</p>
</blockquote>
<ul>
<li><p>创建仓库</p>
<ul>
<li><p>在路径下创建空目录</p>
<blockquote>
<p>可以修改新建路径，默认C/Users/you</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">mkdir newrepo</span><br><span class="line"><span class="built_in">cd</span> newrepo</span><br></pre></td></tr></table></figure>
</blockquote>
</li>
<li><p>在新建的目录下完成初始化</p>
<blockquote>
<p>在目录下会出现一个名为 .git 的目录，所有 Git 需要的数据和资源都存放在这个目录中</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">git init</span><br><span class="line"><span class="comment"># 或者直接把创建目录和初始化一步完成</span></span><br><span class="line">git init newrepo</span><br></pre></td></tr></table></figure>
</blockquote>
</li>
</ul>
</li>
<li><p>本地仓库管理(文件版本管理)</p>
<blockquote>
<p>所有要管理的文件必须放在仓库中</p>
</blockquote>
<ul>
<li><p>添加文件</p>
<blockquote>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># 把文件从工作区Working Directory添加到缓存index</span></span><br><span class="line"><span class="comment">#  git add 文件名</span></span><br><span class="line"><span class="comment"># 文件名有空格时，需要写在引号中</span></span><br><span class="line">git add CodeAlgorithm.md</span><br><span class="line"><span class="comment"># 把全部文件添加到缓存区</span></span><br><span class="line">git add --all</span><br><span class="line"></span><br><span class="line"><span class="comment"># 把文件从缓存区index提交到Git仓库中master</span></span><br><span class="line"><span class="comment"># 可以一次提交多个文件，即多次add后再commit</span></span><br><span class="line"><span class="comment"># git commit -m "提交说明"</span></span><br><span class="line">git commit -m <span class="string">"test"</span></span><br><span class="line"><span class="comment"># 跳过添加成缓存步骤，直接添加到仓库中  -a</span></span><br><span class="line">git commit -a</span><br></pre></td></tr></table></figure></blockquote>
</li>
</ul>
</li>
<li><p>查看改动</p>
<blockquote>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># 查看缓存区index文件</span></span><br><span class="line"><span class="comment"># A 表示缓存区</span></span><br><span class="line"><span class="comment"># AM 表示该文件添加进缓存区后被改动过，此时需要再次add</span></span><br><span class="line"><span class="comment"># ??表示不再缓存区</span></span><br><span class="line">git status -s</span><br><span class="line"></span><br><span class="line"><span class="comment"># 查看具体改动</span></span><br><span class="line"><span class="comment"># 查看执行 git status 的结果的详细信息</span></span><br><span class="line"><span class="comment"># 尚未缓存的改动</span></span><br><span class="line">git diff</span><br><span class="line"><span class="comment"># 查看已缓存的改动</span></span><br><span class="line">git diff --cached</span><br><span class="line"><span class="comment"># 查看已缓存的与未缓存的所有改动</span></span><br><span class="line">git diff HEAD</span><br><span class="line"><span class="comment"># 显示摘要而非整个 diff</span></span><br><span class="line">git diff --<span class="built_in">stat</span></span><br></pre></td></tr></table></figure>
</blockquote>
<ul>
<li><p>查看历史记录</p>
<blockquote>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># 详细历史日志</span></span><br><span class="line">git <span class="built_in">log</span></span><br><span class="line"><span class="comment"># 单行简易输出</span></span><br><span class="line">git <span class="built_in">log</span> --pretty=oneline</span><br></pre></td></tr></table></figure></blockquote>
</li>
<li><p>文件版本回溯</p>
</li>
</ul>
<blockquote>
<p>在Git中，用<code>HEAD</code>表示当前版本，上一个版本就是<code>HEAD^</code>，上上一个版本就是<code>HEAD^^</code>，往上100个版本简写成<code>HEAD~100</code>。</p>
<p>Git在内部有个指向当前版本的<code>HEAD</code>指针，回溯版本实际上是改变指针的对象。</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># 版本回溯 --旧版</span></span><br><span class="line"><span class="comment"># git reset 版本(HEAD表示法、或者log下显示的版本号---输入前几位即可自动匹配)</span></span><br><span class="line">git reset --hard HEAD^</span><br><span class="line">git reset --hard xxxxxx</span><br><span class="line"></span><br><span class="line"><span class="comment"># 版本回溯 --新版</span></span><br><span class="line"><span class="comment"># 从master恢复暂存区</span></span><br><span class="line">git resotre --worktree File</span><br><span class="line"><span class="comment"># 从暂存区恢复工作区</span></span><br><span class="line">git restore --staged </span><br><span class="line"><span class="comment"># 从master同时恢复工作区和暂存区</span></span><br><span class="line">git restore --<span class="built_in">source</span>=HEAD --staged --worktree 文件名</span><br><span class="line"></span><br><span class="line"><span class="comment"># 查看当前记录、版本号</span></span><br><span class="line">git <span class="built_in">log</span></span><br><span class="line"><span class="comment"># 查看之前指令的相关记录---可以看到版本号</span></span><br><span class="line">git reflog</span><br></pre></td></tr></table></figure>
</blockquote>
<ul>
<li><p>文件撤销修改</p>
<blockquote>
<p>把文件在工作区的修改全部撤销，这里有两种情况：</p>
</blockquote>
<ul>
<li>一种是文件自修改后还没有被放到暂存区，现在，撤销修改就回到和版本库一模一样的状态；</li>
</ul>
</li>
</ul>
</li>
<li><p>一种是文件已经添加到暂存区后，又作了修改，现在，撤销修改就回到添加到暂存区后的状态。</p>
<ul>
<li><p>总之，就是让这个文件回到最近一次<code>git commit</code>或<code>git add</code>时的状态。</p>
<blockquote>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># 旧版</span></span><br><span class="line">git checkout -- 文件名</span><br><span class="line"></span><br><span class="line"><span class="comment"># 新版</span></span><br><span class="line">git restore 文件名</span><br></pre></td></tr></table></figure>
</blockquote>
<ul>
<li>文件删除与恢复</li>
</ul>
<blockquote>
<p>工作区的文件被删除后，在删除版本库中的文件</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">git rm  文件名</span><br><span class="line">git commit -m <span class="string">"说明remove "</span></span><br></pre></td></tr></table></figure>

<p>工作区的文佳误删后，通过版本库恢复文件</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">rm <span class="string">'文件名'</span></span><br><span class="line">git restore 文件名</span><br></pre></td></tr></table></figure>
</blockquote>
</li>
</ul>
<ul>
<li><p>创建、切换、删除分支</p>
<blockquote>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># 默认主分支master</span></span><br><span class="line"><span class="comment"># 创建一个叫做"feature_x"的分支，并切换过去：-b</span></span><br><span class="line">git checkout -b feature_x</span><br><span class="line"></span><br><span class="line"><span class="comment"># 切换回主分支：</span></span><br><span class="line">git checkout master</span><br><span class="line"></span><br><span class="line"><span class="comment"># 再把新建的分支删掉：-d</span></span><br><span class="line">git branch -d feature_x</span><br><span class="line"></span><br><span class="line"><span class="comment"># 除非你将分支推送到远端仓库，不然该分支就是 不为他人所见的：</span></span><br><span class="line">git push origin &lt;branch&gt;</span><br></pre></td></tr></table></figure>
</blockquote>
</li>
</ul>
</li>
</ul>
<hr>
<h3 id="3-Git远程仓库"><a href="#3-Git远程仓库" class="headerlink" title="3. Git远程仓库"></a>3. Git远程仓库</h3><blockquote>
<p>将文件push到远程仓库的流程</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># 在目标路径下Git bash</span></span><br><span class="line">git init</span><br><span class="line">git add -all</span><br><span class="line">git commit -m <span class="string">'readme'</span></span><br><span class="line">git remote add origin git@server-name:path/repo-name.git</span><br><span class="line"><span class="comment"># git remote -v</span></span><br><span class="line">git push -u origin master</span><br></pre></td></tr></table></figure>
</blockquote>
<ul>
<li><p>创建SSH Key</p>
<blockquote>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># 会在用户主目录下，生成.ssh目录，里面有id_rsa私钥、id_ras.pub公钥文件</span></span><br><span class="line">ssh-keygen -t rsa -C <span class="string">"youremail@example.com"</span></span><br></pre></td></tr></table></figure>

<p><a href="mailto:youremail@example.com">youremail@example.com</a>使用注册Github、Gitee时的邮箱</p>
</blockquote>
</li>
<li><p>登陆Github，Add SSH Key</p>
<blockquote>
<p>打开“Account settings”，“SSH Keys”页面，点“Add SSH Key”，填上任意Title，在Key文本框里粘贴<code>id_rsa.pub</code>文件的内容</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># 验证是否成功</span></span><br><span class="line">ssh -T git@github.com</span><br></pre></td></tr></table></figure>
</blockquote>
</li>
<li><p>在Github上创建新的库并关联remote，将本地库推送到远程库push</p>
<blockquote>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># 关联远程库</span></span><br><span class="line">git remote add origin git@server-name:path/repo-name.git</span><br><span class="line">git remote add origin(远程库名，默认origin) git@github.com:Github用户名/远程库名</span><br><span class="line">git remote add origin git@github.com:Amaduess/newrepo.git</span><br><span class="line"><span class="comment"># 删除已有的关联origin</span></span><br><span class="line">git remote rm origin</span><br><span class="line"><span class="comment"># 查看现有的关联</span></span><br><span class="line"> git remote -v</span><br><span class="line"> </span><br><span class="line"><span class="comment"># 推送push</span></span><br><span class="line"><span class="comment"># 第一次push -u 将本地master与远程master关联</span></span><br><span class="line">git push -u origin master</span><br><span class="line"><span class="comment"># 之后push</span></span><br><span class="line">git push origin master</span><br></pre></td></tr></table></figure>
</blockquote>
</li>
<li><p>从远程库克隆到本地库</p>
<blockquote>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">git <span class="built_in">clone</span> git@server-name:path/repo-name.git</span><br><span class="line">git <span class="built_in">clone</span> git@github.com:Github用户名/远程库名</span><br></pre></td></tr></table></figure>
</blockquote>
</li>
<li><p>克隆后可以更新本地库pull</p>
<blockquote>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># 在当前工作目录中 获取（fetch） 并 合并（merge） 远端的改动</span></span><br><span class="line">git pull</span><br></pre></td></tr></table></figure>
</blockquote>
</li>
<li><p>其他</p>
<blockquote>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># 内建的图形化 git：</span></span><br><span class="line">gitk</span><br><span class="line"></span><br><span class="line"><span class="comment"># 创建标签</span></span><br><span class="line">git tag 1.0.0  ID(前十位字符)</span><br><span class="line"></span><br><span class="line"><span class="comment"># 彩色的 git 输出：</span></span><br><span class="line">git config color.ui <span class="literal">true</span></span><br><span class="line"></span><br><span class="line"><span class="comment"># 显示历史记录时，每个提交的信息只显示一行：</span></span><br><span class="line">git config format.pretty oneline</span><br><span class="line"></span><br><span class="line"><span class="comment"># 交互式添加文件到暂存区：</span></span><br><span class="line">git add -i</span><br></pre></td></tr></table></figure>
</blockquote>
</li>
</ul>
<hr>
<hr>
<h2 id="三、利用Hexo搭建博客"><a href="#三、利用Hexo搭建博客" class="headerlink" title="三、利用Hexo搭建博客"></a>三、利用Hexo搭建博客</h2><blockquote>
<p><a href="http://dongshuyan.com/2016/04/07/%E6%80%8E%E4%B9%88%E5%86%99%E5%8D%9A%E5%AE%A2/" target="_blank" rel="noopener">Hexo博客搭建教程</a></p>
</blockquote>
<h3 id="1-准备工作-Nodejs-amp-Git"><a href="#1-准备工作-Nodejs-amp-Git" class="headerlink" title="1. 准备工作 Nodejs &amp; Git"></a>1. 准备工作 Nodejs &amp; Git</h3><ul>
<li><p>配置Node.js</p>
<blockquote>
<p><a href="https://nodejs.org/en/" target="_blank" rel="noopener">Nodejs官网</a></p>
</blockquote>
</li>
<li><p>配置Git</p>
<blockquote>
<p><a href="https://git-scm.com/downloads" target="_blank" rel="noopener">Git官网</a></p>
</blockquote>
</li>
<li><p>检测安装结果</p>
<blockquote>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># 查看node、npm、git版本</span></span><br><span class="line">node -v</span><br><span class="line">npm -v</span><br><span class="line">git --version</span><br></pre></td></tr></table></figure>
</blockquote>
</li>
<li><p>通过npm安装淘宝镜像源cnmp</p>
<blockquote>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># 安装cnpm</span></span><br><span class="line">npm install -g cnpm --registry=https://registry.npm.taobao.org</span><br><span class="line"></span><br><span class="line"><span class="comment"># 查看cnpm版本</span></span><br><span class="line">cnpm --version</span><br></pre></td></tr></table></figure>
</blockquote>
</li>
</ul>
<hr>
<h3 id="2-Hexo安装及配置"><a href="#2-Hexo安装及配置" class="headerlink" title="2. Hexo安装及配置"></a>2. Hexo安装及配置</h3><ul>
<li><p>安装Hexo</p>
<blockquote>
<p><a href="https://hexo.io/" target="_blank" rel="noopener">Hexo官网</a></p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># 安装</span></span><br><span class="line">cnpm install -g hexo-cli</span><br><span class="line"><span class="comment"># 查看版本</span></span><br><span class="line">hexo -v</span><br></pre></td></tr></table></figure>
</blockquote>
</li>
<li><p>Hexo初始化</p>
<blockquote>
<p>创建目录，并在此目录下进行后续操作</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># 创建目录</span></span><br><span class="line">mkdir HexoBlog</span><br><span class="line"><span class="built_in">cd</span> HexoBlog</span><br><span class="line"></span><br><span class="line"><span class="comment"># 初始化hexo</span></span><br><span class="line">hexo init</span><br><span class="line"></span><br><span class="line"><span class="comment"># 查看初始化的文件</span></span><br><span class="line">ls -al</span><br><span class="line"></span><br><span class="line"><span class="comment"># ------------------或者--------------------------</span></span><br><span class="line">hexo init HexoBlog</span><br></pre></td></tr></table></figure>
</blockquote>
</li>
<li><p>Hexo启动</p>
<blockquote>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># 启动Hexo 搭建初始博客</span></span><br><span class="line">hexo s</span><br><span class="line"><span class="comment"># 或者</span></span><br><span class="line">hexo server</span><br></pre></td></tr></table></figure>

<p> 此时博客已经初步搭建完成，本地访问地址：<a href="http://localhost:4000" target="_blank" rel="noopener">http://localhost:4000</a></p>
<p>当Git bash上停止服务器后，无法访问</p>
</blockquote>
</li>
<li><p>Hexo基本命令</p>
<blockquote>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br></pre></td><td class="code"><pre><span class="line">npm update hexo -g  <span class="comment">#升级 </span></span><br><span class="line">hexo init &lt;folder&gt;  <span class="comment">#执行init命令初始化hexo到你指定的目录</span></span><br><span class="line">hexo n <span class="string">"我的博客"</span> == hexo new <span class="string">"我的博客"</span> <span class="comment">#新建文章</span></span><br><span class="line">hexo generate       <span class="comment">#自动根据当前目录下文件,生成静态网页 hexo g</span></span><br><span class="line">hexo server         <span class="comment">#运行本地服务 hexo s</span></span><br><span class="line">hexo clean          <span class="comment">#清理</span></span><br><span class="line">hexo deploy         <span class="comment">#部署 hexo d</span></span><br><span class="line"></span><br><span class="line">hexo server         <span class="comment">#Hexo会监视文件变动并自动更新，无须重启服务器</span></span><br><span class="line">hexo server -s      <span class="comment">#静态模式</span></span><br><span class="line">hexo server -p 5000 <span class="comment">#更改端口</span></span><br><span class="line">hexo server -i 192.168.1.1 <span class="comment">#自定义 IP</span></span><br></pre></td></tr></table></figure>
</blockquote>
</li>
</ul>
<hr>
<h3 id="3-博客部署到远端服务器"><a href="#3-博客部署到远端服务器" class="headerlink" title="3. 博客部署到远端服务器"></a>3. 博客部署到远端服务器</h3><ul>
<li><p>使用Github作为远端服务器</p>
<blockquote>
<p>在Github上新建库，库名为：用户名.github.io</p>
<p>ssh：<a href="mailto:git@github.com">git@github.com</a>:Amaduess/Amaduess.github.io.git</p>
</blockquote>
</li>
<li><p>利用cnpm安装一个hexo-deployer-git插件</p>
<blockquote>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># 安装插件</span></span><br><span class="line">cnpm install --save hexo-deployer-git</span><br><span class="line"></span><br><span class="line"><span class="comment"># 打开_config.yml文件，修改内容</span></span><br><span class="line">vim _config.yml</span><br><span class="line"><span class="comment"># 原内容</span></span><br><span class="line">deploy:</span><br><span class="line">	<span class="built_in">type</span> : <span class="string">' '</span></span><br><span class="line"><span class="comment"># 改为</span></span><br><span class="line">deploy:</span><br><span class="line">	<span class="built_in">type</span> : git</span><br><span class="line">	<span class="comment"># 服务器地址(仓库地址)</span></span><br><span class="line">	repo : git@github.com:Amaduess/Amaduess.github.io.git </span><br><span class="line">	<span class="comment"># 分支，设置为管理员</span></span><br><span class="line">	branch : master</span><br></pre></td></tr></table></figure>
</blockquote>
</li>
<li><p>将博客部署到Github上</p>
<blockquote>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">hexo d</span><br><span class="line">hexo deploy</span><br></pre></td></tr></table></figure>
</blockquote>
</li>
</ul>
<hr>
<hr>
<h2 id="四、博客设置美化"><a href="#四、博客设置美化" class="headerlink" title="四、博客设置美化"></a>四、博客设置美化</h2><ul>
<li>各功能教程超链接汇总<ul>
<li><a href="http://dongshuyan.com/2016/04/07/%E6%80%8E%E4%B9%88%E5%86%99%E5%8D%9A%E5%AE%A2/" target="_blank" rel="noopener">MarkDown语法简介</a></li>
<li><a href="[http://dongshuyan.com/2016/04/07/%E6%80%8E%E4%B9%88%E5%86%99%E5%8D%9A%E5%AE%A2/](http://dongshuyan.com/2016/04/07/怎么写博客/)">主题更换</a></li>
<li><a href="https://cloudy-liu.github.io/2018/04/07/Hexo_yilia_%E4%B8%BB%E9%A2%98%E4%B8%80%E6%8F%BD%E5%AD%90%E4%BC%98%E5%8C%96%E6%96%B9%E6%A1%88/#%E7%99%BE%E5%BA%A6-Google%E7%BB%9F%E8%AE%A1-SEO" target="_blank" rel="noopener">配置图片和链接</a></li>
<li><a href="https://blog.csdn.net/qq_37939980/article/details/104390332" target="_blank" rel="noopener">文章摘要、目录、归档、字体</a></li>
<li><a href="https://blog.csdn.net/qq_40922859/article/details/97035497?utm_medium=distribute.pc_relevant.none-task-blog-BlogCommendFromMachineLearnPai2-2.channel_param&depth_1-utm_source=distribute.pc_relevant.none-task-blog-BlogCommendFromMachineLearnPai2-2.channel_param" target="_blank" rel="noopener">美化目录</a></li>
<li><a href="https://blog.csdn.net/qq_37939980/article/details/104390332" target="_blank" rel="noopener">文章总数统计、主页美化</a></li>
</ul>
</li>
</ul>
<h3 id="1-主题更换-：Yilia"><a href="#1-主题更换-：Yilia" class="headerlink" title="1. 主题更换 ：Yilia"></a>1. 主题更换 ：Yilia</h3><ul>
<li><p>下载开源的主题，存放在HexoBlog/theme目录下</p>
<blockquote>
<p>选择Github上很多人star的[Yilia主题](<a href="https://github.com/litten/hexo-theme-yilia.git" target="_blank" rel="noopener">https://github.com/litten/hexo-theme-yilia.git</a> themes/yilia)</p>
<p>此外，还有<a href="https://zhousiwei.gitee.io/2019/07/25/hexo%E4%B8%BB%E9%A2%98%E4%B9%8Bhexo-theme-yilia-plus/" target="_blank" rel="noopener">Yilia-plus主题</a>、Next主题等</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># 在HexoBlog目录下Git bash</span></span><br><span class="line">git <span class="built_in">clone</span> https://github.com/litten/hexo-theme-yilia.git themes/yilia</span><br></pre></td></tr></table></figure>
</blockquote>
</li>
<li><p>修改_config.yml文件</p>
<blockquote>
<figure class="highlight yml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line"><span class="attr">theme :</span> <span class="string">landscape</span></span><br><span class="line"><span class="comment"># 改为</span></span><br><span class="line"><span class="attr">theme :</span> <span class="string">yilia</span></span><br></pre></td></tr></table></figure>
</blockquote>
</li>
<li><p>清理hexo并重新生成页面，部署到Github上</p>
<blockquote>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># 清理</span></span><br><span class="line">hexo clean</span><br><span class="line"></span><br><span class="line"><span class="comment"># 生成</span></span><br><span class="line">hexo g</span><br><span class="line">hexo generate</span><br><span class="line"></span><br><span class="line"><span class="comment"># 本地预览</span></span><br><span class="line">hexo s</span><br><span class="line"></span><br><span class="line"><span class="comment"># 部署</span></span><br><span class="line">hexo d</span><br></pre></td></tr></table></figure>
</blockquote>
</li>
</ul>
<hr>
<h3 id="2-配置图片资源和链接资源"><a href="#2-配置图片资源和链接资源" class="headerlink" title="2. 配置图片资源和链接资源"></a>2. 配置图片资源和链接资源</h3><blockquote>
<p>添加WeChat、Email、Github等作为博主的联系方式</p>
<p>添加个人头像、网页favicon</p>
</blockquote>
<ul>
<li><p>添加图片资源文件夹</p>
<blockquote>
<p>路径为 <code>themes/yilia/source/</code>下，可添加一个 <code>assets</code> 文件夹，里面存放图片资源即可</p>
</blockquote>
</li>
<li><p>配置文件中直接引用</p>
<blockquote>
<p>路径为 <code>themes/yilia/_config.yml</code></p>
<figure class="highlight yml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># 微信二维码图片</span></span><br><span class="line"><span class="attr">weixin:</span>  <span class="string">/assets/wechat.jpg</span></span><br><span class="line"><span class="comment"># 头像图片</span></span><br><span class="line"><span class="attr">avatar:</span>  <span class="string">/assets/avatar.jpg</span></span><br><span class="line"><span class="comment"># 网页图标</span></span><br><span class="line"><span class="attr">favicon:</span>  <span class="string">/assets/favicon.png</span></span><br></pre></td></tr></table></figure>
</blockquote>
</li>
<li><p>链接资源——配置文件中直接引用链接地址</p>
<blockquote>
<p>路径为 <code>themes/yilia/_config.yml</code></p>
<p>如：Github、Facebook、Twitter、Bilibili等</p>
<figure class="highlight yml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line"><span class="attr">github:</span> <span class="string">"https://github.com/Chthollists"</span></span><br><span class="line"><span class="attr">bilibili:</span> <span class="string">"https://space.bilibili.com/2030799"</span></span><br></pre></td></tr></table></figure>
</blockquote>
</li>
<li><p>注意：_config.yml的语句对空格、缩进要求严格</p>
</li>
</ul>
<hr>
<h3 id="3-博客文章美化设置"><a href="#3-博客文章美化设置" class="headerlink" title="3. 博客文章美化设置"></a>3. 博客文章美化设置</h3><h4 id="3-1-显示文章摘要"><a href="#3-1-显示文章摘要" class="headerlink" title="3.1 显示文章摘要"></a>3.1 显示文章摘要</h4><ul>
<li><p>在你MD 格式文章正文,一般在标题后插入 <code>&lt;!-- more --&gt;</code></p>
<blockquote>
<p>同时注释掉 <code>themes/yilia/_config.yml</code>内的</p>
<figure class="highlight yml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># 文章太长，截断按钮文字</span></span><br><span class="line"><span class="comment"># excerpt_link: more</span></span><br></pre></td></tr></table></figure>
</blockquote>
</li>
</ul>
<h4 id="3-2-显示文章目录TOC"><a href="#3-2-显示文章目录TOC" class="headerlink" title="3.2 显示文章目录TOC"></a>3.2 显示文章目录TOC</h4><ul>
<li><p>TOC(table of content) 在 <code>themes/yilia/_config.yml</code>中进行配置</p>
<blockquote>
<figure class="highlight yml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># 目录设定：</span></span><br><span class="line"><span class="comment"># 0-不显示目录； </span></span><br><span class="line"><span class="comment"># 1-文章对应的md文件里有toc:true属性，才有目录； </span></span><br><span class="line"><span class="comment"># 2-所有文章均显示目录</span></span><br><span class="line"><span class="attr">toc:</span> <span class="number">2</span></span><br></pre></td></tr></table></figure>
</blockquote>
</li>
</ul>
<h4 id="3-3-增加归档菜单"><a href="#3-3-增加归档菜单" class="headerlink" title="3.3 增加归档菜单"></a>3.3 增加归档菜单</h4><ul>
<li><p>修改 <code>themes/yilia/_config.yml</code>配置</p>
<blockquote>
<figure class="highlight yml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line"><span class="attr">menu:</span></span><br><span class="line">    <span class="string">主页:</span>  <span class="string">/</span></span><br><span class="line">    <span class="string">归档:</span>  <span class="string">/archives/index.html</span></span><br></pre></td></tr></table></figure>
</blockquote>
</li>
</ul>
<h4 id="3-4-美化目录"><a href="#3-4-美化目录" class="headerlink" title="3.4 美化目录"></a>3.4 美化目录</h4><blockquote>
<p>通过toc = 2生成的蓝底目录不够美观，通过修改css和ejs文件来自制滑动白色目录</p>
<p>注意：此时yilia主题的原目录无法显示。</p>
</blockquote>
<ul>
<li><p>修改css文件</p>
<blockquote>
<p>themes\yilia\source\路径下找到<code>main.xxxxx.css</code>，在最后添加代码</p>
<figure class="highlight css"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br><span class="line">44</span><br><span class="line">45</span><br><span class="line">46</span><br><span class="line">47</span><br><span class="line">48</span><br><span class="line">49</span><br><span class="line">50</span><br><span class="line">51</span><br><span class="line">52</span><br><span class="line">53</span><br><span class="line">54</span><br><span class="line">55</span><br><span class="line">56</span><br><span class="line">57</span><br><span class="line">58</span><br><span class="line">59</span><br><span class="line">60</span><br><span class="line">61</span><br><span class="line">62</span><br><span class="line">63</span><br><span class="line">64</span><br><span class="line">65</span><br><span class="line">66</span><br><span class="line">67</span><br><span class="line">68</span><br><span class="line">69</span><br><span class="line">70</span><br><span class="line">71</span><br><span class="line">72</span><br><span class="line">73</span><br><span class="line">74</span><br><span class="line">75</span><br><span class="line">76</span><br><span class="line">77</span><br><span class="line">78</span><br><span class="line">79</span><br><span class="line">80</span><br><span class="line">81</span><br><span class="line">82</span><br><span class="line">83</span><br><span class="line">84</span><br><span class="line">85</span><br><span class="line">86</span><br><span class="line">87</span><br><span class="line">88</span><br><span class="line">89</span><br><span class="line">90</span><br><span class="line">91</span><br><span class="line">92</span><br><span class="line">93</span><br><span class="line">94</span><br><span class="line">95</span><br><span class="line">96</span><br><span class="line">97</span><br><span class="line">98</span><br><span class="line">99</span><br><span class="line">100</span><br><span class="line">101</span><br><span class="line">102</span><br><span class="line">103</span><br><span class="line">104</span><br><span class="line">105</span><br><span class="line">106</span><br><span class="line">107</span><br><span class="line">108</span><br><span class="line">109</span><br><span class="line">110</span><br><span class="line">111</span><br><span class="line">112</span><br><span class="line">113</span><br><span class="line">114</span><br><span class="line">115</span><br><span class="line">116</span><br><span class="line">117</span><br><span class="line">118</span><br><span class="line">119</span><br><span class="line">120</span><br><span class="line">121</span><br><span class="line">122</span><br><span class="line">123</span><br><span class="line">124</span><br><span class="line">125</span><br><span class="line">126</span><br><span class="line">127</span><br><span class="line">128</span><br><span class="line">129</span><br><span class="line">130</span><br><span class="line">131</span><br><span class="line">132</span><br><span class="line">133</span><br><span class="line">134</span><br><span class="line">135</span><br><span class="line">136</span><br><span class="line">137</span><br><span class="line">138</span><br><span class="line">139</span><br><span class="line">140</span><br><span class="line">141</span><br><span class="line">142</span><br><span class="line">143</span><br><span class="line">144</span><br><span class="line">145</span><br><span class="line">146</span><br><span class="line">147</span><br><span class="line">148</span><br><span class="line">149</span><br><span class="line">150</span><br><span class="line">151</span><br><span class="line">152</span><br><span class="line">153</span><br><span class="line">154</span><br><span class="line">155</span><br><span class="line">156</span><br><span class="line">157</span><br><span class="line">158</span><br><span class="line">159</span><br><span class="line">160</span><br><span class="line">161</span><br><span class="line">162</span><br><span class="line">163</span><br><span class="line">164</span><br><span class="line">165</span><br><span class="line">166</span><br><span class="line">167</span><br><span class="line">168</span><br><span class="line">169</span><br><span class="line">170</span><br><span class="line">171</span><br><span class="line">172</span><br><span class="line">173</span><br><span class="line">174</span><br><span class="line">175</span><br><span class="line">176</span><br><span class="line">177</span><br><span class="line">178</span><br><span class="line">179</span><br><span class="line">180</span><br><span class="line">181</span><br><span class="line">182</span><br><span class="line">183</span><br><span class="line">184</span><br><span class="line">185</span><br><span class="line">186</span><br><span class="line">187</span><br><span class="line">188</span><br><span class="line">189</span><br><span class="line">190</span><br><span class="line">191</span><br><span class="line">192</span><br><span class="line">193</span><br><span class="line">194</span><br><span class="line">195</span><br><span class="line">196</span><br><span class="line">197</span><br><span class="line">198</span><br><span class="line">199</span><br><span class="line">200</span><br><span class="line">201</span><br><span class="line">202</span><br><span class="line">203</span><br><span class="line">204</span><br><span class="line">205</span><br><span class="line">206</span><br></pre></td><td class="code"><pre><span class="line"><span class="selector-id">#container</span> <span class="selector-class">.show-toc-btn</span>,</span><br><span class="line"><span class="selector-id">#container</span> <span class="selector-class">.toc-article</span>&#123;<span class="attribute">display</span>:block&#125;</span><br><span class="line"></span><br><span class="line"><span class="selector-class">.toc-article</span>&#123;</span><br><span class="line"> <span class="attribute">z-index</span>:<span class="number">100</span>;</span><br><span class="line"> <span class="attribute">background</span>:<span class="number">#fff</span>;</span><br><span class="line"> <span class="attribute">border</span>:<span class="number">1px</span> solid <span class="number">#ccc</span>;</span><br><span class="line"> <span class="attribute">max-width</span>:<span class="number">250px</span>;</span><br><span class="line"> <span class="attribute">min-width</span>:<span class="number">150px</span>;</span><br><span class="line"> <span class="attribute">max-height</span>:<span class="number">500px</span>;</span><br><span class="line"> <span class="attribute">overflow-y</span>:auto;</span><br><span class="line"> <span class="attribute">-webkit-box-shadow</span>:<span class="number">5px</span> <span class="number">5px</span> <span class="number">2px</span> <span class="number">#ccc</span>;</span><br><span class="line"> <span class="attribute">box-shadow</span>:<span class="number">5px</span> <span class="number">5px</span> <span class="number">2px</span> <span class="number">#ccc</span>;</span><br><span class="line"> <span class="attribute">font-size</span>:<span class="number">12px</span>;</span><br><span class="line"> <span class="attribute">padding</span>:<span class="number">10px</span>;</span><br><span class="line"> <span class="attribute">position</span>:fixed;</span><br><span class="line"> <span class="attribute">right</span>:<span class="number">35px</span>;</span><br><span class="line"> <span class="attribute">top</span>:<span class="number">129px</span></span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="selector-class">.toc-article</span> <span class="selector-class">.toc-close</span>&#123;</span><br><span class="line"> <span class="attribute">font-weight</span>:<span class="number">700</span>;</span><br><span class="line"> <span class="attribute">font-size</span>:<span class="number">20px</span>;</span><br><span class="line"> <span class="attribute">cursor</span>:pointer;</span><br><span class="line"> <span class="attribute">float</span>:right;<span class="attribute">color</span>:<span class="number">#ccc</span></span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="selector-class">.toc-article</span> <span class="selector-class">.toc-close</span><span class="selector-pseudo">:hover</span>&#123;</span><br><span class="line"> <span class="attribute">color</span>:<span class="number">#000</span></span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="selector-class">.toc-article</span> <span class="selector-class">.toc</span>&#123;</span><br><span class="line"> <span class="attribute">font-size</span>:<span class="number">12px</span>;</span><br><span class="line"> <span class="attribute">padding</span>:<span class="number">0</span>;</span><br><span class="line"> <span class="attribute">line-height</span>:<span class="number">20px</span></span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="selector-class">.toc-article</span> <span class="selector-class">.toc</span> <span class="selector-class">.toc-number</span>&#123;</span><br><span class="line"> <span class="attribute">color</span>:<span class="number">#333</span></span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="selector-class">.toc-article</span> <span class="selector-class">.toc</span> <span class="selector-class">.toc-text</span><span class="selector-pseudo">:hover</span>&#123;</span><br><span class="line"> <span class="attribute">text-decoration</span>:underline;</span><br><span class="line"> <span class="attribute">color</span>:<span class="number">#2a6496</span></span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="selector-class">.toc-article</span> <span class="selector-tag">li</span>&#123;</span><br><span class="line"> <span class="attribute">list-style-type</span>:none</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="selector-class">.toc-article</span> <span class="selector-class">.toc-level-1</span>&#123;</span><br><span class="line"> <span class="attribute">margin</span>:<span class="number">4px</span> <span class="number">0</span></span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="selector-class">.toc-article</span> <span class="selector-class">.toc-child</span>&#123;&#125;</span><br><span class="line"></span><br><span class="line"><span class="keyword">@-moz-keyframes</span> cd-bounce-<span class="number">1</span>&#123;</span><br><span class="line"> 0%&#123;</span><br><span class="line">     <span class="attribute">opacity</span>:<span class="number">0</span>;</span><br><span class="line">     <span class="attribute">-o-transform</span>:<span class="built_in">scale</span>(<span class="number">1</span>);</span><br><span class="line">     <span class="attribute">-webkit-transform</span>:<span class="built_in">scale</span>(<span class="number">1</span>);</span><br><span class="line">     <span class="attribute">-moz-transform</span>:<span class="built_in">scale</span>(<span class="number">1</span>);</span><br><span class="line">     <span class="attribute">-ms-transform</span>:<span class="built_in">scale</span>(<span class="number">1</span>);</span><br><span class="line">     <span class="attribute">transform</span>:<span class="built_in">scale</span>(<span class="number">1</span>)</span><br><span class="line"> &#125;</span><br><span class="line"> 60%&#123;</span><br><span class="line">     <span class="attribute">opacity</span>:<span class="number">1</span>;</span><br><span class="line">     <span class="attribute">-o-transform</span>:<span class="built_in">scale</span>(<span class="number">1.01</span>);</span><br><span class="line">     <span class="attribute">-webkit-transform</span>:<span class="built_in">scale</span>(<span class="number">1.01</span>);</span><br><span class="line">     <span class="attribute">-moz-transform</span>:<span class="built_in">scale</span>(<span class="number">1.01</span>);</span><br><span class="line">     <span class="attribute">-ms-transform</span>:<span class="built_in">scale</span>(<span class="number">1.01</span>);</span><br><span class="line">     <span class="attribute">transform</span>:<span class="built_in">scale</span>(<span class="number">1.01</span>)</span><br><span class="line"> &#125;</span><br><span class="line"> 100%&#123;</span><br><span class="line">     <span class="attribute">-o-transform</span>:<span class="built_in">scale</span>(<span class="number">1</span>);</span><br><span class="line">     <span class="attribute">-webkit-transform</span>:<span class="built_in">scale</span>(<span class="number">1</span>);</span><br><span class="line">     <span class="attribute">-moz-transform</span>:<span class="built_in">scale</span>(<span class="number">1</span>);</span><br><span class="line">     <span class="attribute">-ms-transform</span>:<span class="built_in">scale</span>(<span class="number">1</span>);</span><br><span class="line">     <span class="attribute">transform</span>:<span class="built_in">scale</span>(<span class="number">1</span>)&#125;</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="keyword">@-webkit-keyframes</span> cd-bounce-<span class="number">1</span>&#123;</span><br><span class="line"> 0%&#123;</span><br><span class="line">     <span class="attribute">opacity</span>:<span class="number">0</span>;</span><br><span class="line">     <span class="attribute">-o-transform</span>:<span class="built_in">scale</span>(<span class="number">1</span>);</span><br><span class="line">     <span class="attribute">-webkit-transform</span>:<span class="built_in">scale</span>(<span class="number">1</span>);</span><br><span class="line">     <span class="attribute">-moz-transform</span>:<span class="built_in">scale</span>(<span class="number">1</span>);</span><br><span class="line">     <span class="attribute">-ms-transform</span>:<span class="built_in">scale</span>(<span class="number">1</span>);</span><br><span class="line">     <span class="attribute">transform</span>:<span class="built_in">scale</span>(<span class="number">1</span>)</span><br><span class="line"> &#125;</span><br><span class="line"> 60%&#123;</span><br><span class="line">     <span class="attribute">opacity</span>:<span class="number">1</span>;</span><br><span class="line">     <span class="attribute">-o-transform</span>:<span class="built_in">scale</span>(<span class="number">1.01</span>);</span><br><span class="line">     <span class="attribute">-webkit-transform</span>:<span class="built_in">scale</span>(<span class="number">1.01</span>);</span><br><span class="line">     <span class="attribute">-moz-transform</span>:<span class="built_in">scale</span>(<span class="number">1.01</span>);</span><br><span class="line">     <span class="attribute">-ms-transform</span>:<span class="built_in">scale</span>(<span class="number">1.01</span>);</span><br><span class="line">     <span class="attribute">transform</span>:<span class="built_in">scale</span>(<span class="number">1.01</span>)</span><br><span class="line"> &#125;</span><br><span class="line"> 100%&#123;</span><br><span class="line">     <span class="attribute">-o-transform</span>:<span class="built_in">scale</span>(<span class="number">1</span>);</span><br><span class="line">     <span class="attribute">-webkit-transform</span>:<span class="built_in">scale</span>(<span class="number">1</span>);</span><br><span class="line">     <span class="attribute">-moz-transform</span>:<span class="built_in">scale</span>(<span class="number">1</span>);</span><br><span class="line">     <span class="attribute">-ms-transform</span>:<span class="built_in">scale</span>(<span class="number">1</span>);</span><br><span class="line">     <span class="attribute">transform</span>:<span class="built_in">scale</span>(<span class="number">1</span>)&#125;</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="keyword">@-o-keyframes</span> cd-bounce-<span class="number">1</span>&#123;</span><br><span class="line"> 0%&#123;</span><br><span class="line">     <span class="attribute">opacity</span>:<span class="number">0</span>;</span><br><span class="line">     <span class="attribute">-o-transform</span>:<span class="built_in">scale</span>(<span class="number">1</span>);</span><br><span class="line">     <span class="attribute">-webkit-transform</span>:<span class="built_in">scale</span>(<span class="number">1</span>);</span><br><span class="line">     <span class="attribute">-moz-transform</span>:<span class="built_in">scale</span>(<span class="number">1</span>);</span><br><span class="line">     <span class="attribute">-ms-transform</span>:<span class="built_in">scale</span>(<span class="number">1</span>);</span><br><span class="line">     <span class="attribute">transform</span>:<span class="built_in">scale</span>(<span class="number">1</span>)</span><br><span class="line"> &#125;</span><br><span class="line"> 60%&#123;</span><br><span class="line">     <span class="attribute">opacity</span>:<span class="number">1</span>;</span><br><span class="line">     <span class="attribute">-o-transform</span>:<span class="built_in">scale</span>(<span class="number">1.01</span>);</span><br><span class="line">     <span class="attribute">-webkit-transform</span>:<span class="built_in">scale</span>(<span class="number">1.01</span>);</span><br><span class="line">     <span class="attribute">-moz-transform</span>:<span class="built_in">scale</span>(<span class="number">1.01</span>);</span><br><span class="line">     <span class="attribute">-ms-transform</span>:<span class="built_in">scale</span>(<span class="number">1.01</span>);</span><br><span class="line">     <span class="attribute">transform</span>:<span class="built_in">scale</span>(<span class="number">1.01</span>)</span><br><span class="line"> &#125;</span><br><span class="line"> 100%&#123;</span><br><span class="line">     <span class="attribute">-o-transform</span>:<span class="built_in">scale</span>(<span class="number">1</span>);</span><br><span class="line">     <span class="attribute">-webkit-transform</span>:<span class="built_in">scale</span>(<span class="number">1</span>);</span><br><span class="line">     <span class="attribute">-moz-transform</span>:<span class="built_in">scale</span>(<span class="number">1</span>);</span><br><span class="line">     <span class="attribute">-ms-transform</span>:<span class="built_in">scale</span>(<span class="number">1</span>);</span><br><span class="line">     <span class="attribute">transform</span>:<span class="built_in">scale</span>(<span class="number">1</span>)&#125;</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="keyword">@keyframes</span> cd-bounce-<span class="number">1</span>&#123;</span><br><span class="line"> 0%&#123;</span><br><span class="line">     <span class="attribute">opacity</span>:<span class="number">0</span>;</span><br><span class="line">     <span class="attribute">-o-transform</span>:<span class="built_in">scale</span>(<span class="number">1</span>);</span><br><span class="line">     <span class="attribute">-webkit-transform</span>:<span class="built_in">scale</span>(<span class="number">1</span>);</span><br><span class="line">     <span class="attribute">-moz-transform</span>:<span class="built_in">scale</span>(<span class="number">1</span>);</span><br><span class="line">     <span class="attribute">-ms-transform</span>:<span class="built_in">scale</span>(<span class="number">1</span>);</span><br><span class="line">     <span class="attribute">transform</span>:<span class="built_in">scale</span>(<span class="number">1</span>)</span><br><span class="line"> &#125;</span><br><span class="line"> 60%&#123;</span><br><span class="line">     <span class="attribute">opacity</span>:<span class="number">1</span>;</span><br><span class="line">     <span class="attribute">-o-transform</span>:<span class="built_in">scale</span>(<span class="number">1.01</span>);</span><br><span class="line">     <span class="attribute">-webkit-transform</span>:<span class="built_in">scale</span>(<span class="number">1.01</span>);</span><br><span class="line">     <span class="attribute">-moz-transform</span>:<span class="built_in">scale</span>(<span class="number">1.01</span>);</span><br><span class="line">     <span class="attribute">-ms-transform</span>:<span class="built_in">scale</span>(<span class="number">1.01</span>);</span><br><span class="line">     <span class="attribute">transform</span>:<span class="built_in">scale</span>(<span class="number">1.01</span>)</span><br><span class="line"> &#125;</span><br><span class="line"> 100%&#123;</span><br><span class="line">     <span class="attribute">-o-transform</span>:<span class="built_in">scale</span>(<span class="number">1</span>);</span><br><span class="line">     <span class="attribute">-webkit-transform</span>:<span class="built_in">scale</span>(<span class="number">1</span>);</span><br><span class="line">     <span class="attribute">-moz-transform</span>:<span class="built_in">scale</span>(<span class="number">1</span>);</span><br><span class="line">     <span class="attribute">-ms-transform</span>:<span class="built_in">scale</span>(<span class="number">1</span>);</span><br><span class="line">     <span class="attribute">transform</span>:<span class="built_in">scale</span>(<span class="number">1</span>)&#125;</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="selector-class">.show-toc-btn</span>&#123;</span><br><span class="line"> <span class="attribute">display</span>:none;</span><br><span class="line"> <span class="attribute">z-index</span>:<span class="number">10</span>;</span><br><span class="line"> <span class="attribute">width</span>:<span class="number">30px</span>;</span><br><span class="line"> <span class="attribute">min-height</span>:<span class="number">14px</span>;</span><br><span class="line"> <span class="attribute">overflow</span>:hidden;</span><br><span class="line"> <span class="attribute">padding</span>:<span class="number">4px</span> <span class="number">6px</span> <span class="number">8px</span> <span class="number">5px</span>;</span><br><span class="line"> <span class="attribute">border</span>:<span class="number">1px</span> solid <span class="number">#ddd</span>;</span><br><span class="line"> <span class="attribute">border-right</span>:none;</span><br><span class="line"> <span class="attribute">position</span>:fixed;</span><br><span class="line"> <span class="attribute">right</span>:<span class="number">40px</span>;</span><br><span class="line"> <span class="attribute">text-align</span>:center;</span><br><span class="line"> <span class="attribute">background-color</span>:<span class="number">#f9f9f9</span></span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="selector-class">.show-toc-btn</span> <span class="selector-class">.btn-bg</span>&#123;</span><br><span class="line"> <span class="attribute">margintop</span>:<span class="number">2px</span>;</span><br><span class="line"> <span class="attribute">display</span>:block;</span><br><span class="line"> <span class="attribute">width</span>:<span class="number">16px</span>;</span><br><span class="line"> <span class="attribute">height</span>:<span class="number">14px</span>;</span><br><span class="line"> <span class="attribute">background</span>:<span class="built_in">url</span>(https://<span class="number">7</span>xtawy.com1.z0.glb.clouddn.com/show.png) no-repeat;</span><br><span class="line"> <span class="attribute">-webkit-background-size</span>:<span class="number">100%</span>;</span><br><span class="line"> <span class="attribute">-moz-background-size</span>:<span class="number">100%</span>;</span><br><span class="line"> <span class="attribute">background-size</span>:<span class="number">100%</span></span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="selector-class">.show-toc-btn</span> <span class="selector-class">.btn-text</span>&#123;</span><br><span class="line"> <span class="attribute">color</span>:<span class="number">#999</span>;</span><br><span class="line"> <span class="attribute">font-size</span>:<span class="number">12px</span></span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="selector-class">.show-toc-btn</span><span class="selector-pseudo">:hover</span>&#123;</span><br><span class="line"> <span class="attribute">cursor</span>:pointer</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="selector-class">.show-toc-btn</span><span class="selector-pseudo">:hover</span> <span class="selector-class">.btn-bg</span>&#123;</span><br><span class="line"> <span class="attribute">background-position</span>:<span class="number">0</span> -<span class="number">16px</span></span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="selector-class">.show-toc-btn</span><span class="selector-pseudo">:hover</span> <span class="selector-class">.btn-text</span>&#123;</span><br><span class="line"> <span class="attribute">font-size</span>:<span class="number">12px</span>;</span><br><span class="line"> <span class="attribute">color</span>:<span class="number">#ea8010</span></span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="selector-class">.toc-article</span> <span class="selector-tag">li</span> <span class="selector-tag">ol</span>, <span class="selector-class">.toc-article</span> <span class="selector-tag">li</span> <span class="selector-tag">ul</span> &#123;</span><br><span class="line"> <span class="attribute">margin-left</span>: <span class="number">30px</span>;</span><br><span class="line">&#125;</span><br><span class="line"><span class="selector-class">.toc-article</span> <span class="selector-tag">ol</span>, <span class="selector-class">.toc-article</span> <span class="selector-tag">ul</span> &#123;</span><br><span class="line"> <span class="attribute">margin</span>: <span class="number">10px</span> <span class="number">0</span>;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
</blockquote>
</li>
<li><p>修改ejs文件：</p>
<blockquote>
<p>找到<code>themes\yilia\layout\_partial\article.ejs</code>,在 <code>&lt;/header&gt; &lt;% } %&gt;</code>下面加入</p>
<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment">&lt;!-- 目录内容 --&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">%</span> <span class="attr">if</span> (!<span class="attr">index</span> &amp;&amp; <span class="attr">post.toc</span>)&#123; %&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">p</span> <span class="attr">class</span>=<span class="string">"show-toc-btn"</span> <span class="attr">id</span>=<span class="string">"show-toc-btn"</span> <span class="attr">onclick</span>=<span class="string">"showToc();"</span> <span class="attr">style</span>=<span class="string">"display:none"</span>&gt;</span></span><br><span class="line">          <span class="tag">&lt;<span class="name">span</span> <span class="attr">class</span>=<span class="string">"btn-bg"</span>&gt;</span><span class="tag">&lt;/<span class="name">span</span>&gt;</span></span><br><span class="line">          <span class="tag">&lt;<span class="name">span</span> <span class="attr">class</span>=<span class="string">"btn-text"</span>&gt;</span>文章导航<span class="tag">&lt;/<span class="name">span</span>&gt;</span></span><br><span class="line">          <span class="tag">&lt;/<span class="name">p</span>&gt;</span></span><br><span class="line">	<span class="tag">&lt;<span class="name">div</span> <span class="attr">id</span>=<span class="string">"toc-article"</span> <span class="attr">class</span>=<span class="string">"toc-article"</span>&gt;</span></span><br><span class="line">	    <span class="tag">&lt;<span class="name">span</span> <span class="attr">id</span>=<span class="string">"toc-close"</span> <span class="attr">class</span>=<span class="string">"toc-close"</span> <span class="attr">title</span>=<span class="string">"隐藏导航"</span> <span class="attr">onclick</span>=<span class="string">"showBtn();"</span>&gt;</span>×<span class="tag">&lt;/<span class="name">span</span>&gt;</span></span><br><span class="line">		<span class="tag">&lt;<span class="name">strong</span> <span class="attr">class</span>=<span class="string">"toc-title"</span>&gt;</span>文章目录<span class="tag">&lt;/<span class="name">strong</span>&gt;</span></span><br><span class="line">           <span class="tag">&lt;<span class="name">%-</span> <span class="attr">toc</span>(<span class="attr">post.content</span>) %&gt;</span></span><br><span class="line">         <span class="tag">&lt;/<span class="name">div</span>&gt;</span></span><br><span class="line">   <span class="tag">&lt;<span class="name">script</span> <span class="attr">type</span>=<span class="string">"text/javascript"</span>&gt;</span></span><br><span class="line"><span class="actionscript">	<span class="function"><span class="keyword">function</span> <span class="title">showToc</span><span class="params">()</span></span>&#123;</span></span><br><span class="line"><span class="javascript">		<span class="keyword">var</span> toc_article = <span class="built_in">document</span>.getElementById(<span class="string">"toc-article"</span>);</span></span><br><span class="line"><span class="javascript">		<span class="keyword">var</span> show_toc_btn = <span class="built_in">document</span>.getElementById(<span class="string">"show-toc-btn"</span>);</span></span><br><span class="line"><span class="actionscript">		toc_article.setAttribute(<span class="string">"style"</span>,<span class="string">"display:block"</span>);</span></span><br><span class="line"><span class="actionscript">		show_toc_btn.setAttribute(<span class="string">"style"</span>,<span class="string">"display:none"</span>);</span></span><br><span class="line">		&#125;;</span><br><span class="line"><span class="actionscript">	<span class="function"><span class="keyword">function</span> <span class="title">showBtn</span><span class="params">()</span></span>&#123;</span></span><br><span class="line"><span class="javascript">		<span class="keyword">var</span> toc_article = <span class="built_in">document</span>.getElementById(<span class="string">"toc-article"</span>);</span></span><br><span class="line"><span class="javascript">		<span class="keyword">var</span> show_toc_btn = <span class="built_in">document</span>.getElementById(<span class="string">"show-toc-btn"</span>);</span></span><br><span class="line"><span class="actionscript">		toc_article.setAttribute(<span class="string">"style"</span>,<span class="string">"display:none"</span>);</span></span><br><span class="line"><span class="actionscript">		show_toc_btn.setAttribute(<span class="string">"style"</span>,<span class="string">"display:block"</span>);</span></span><br><span class="line">		&#125;;</span><br><span class="line">   <span class="tag">&lt;/<span class="name">script</span>&gt;</span></span><br><span class="line">      <span class="tag">&lt;<span class="name">%</span> &#125; %&gt;</span></span><br><span class="line"><span class="comment">&lt;!-- 目录内容结束 --&gt;</span></span><br></pre></td></tr></table></figure>
</blockquote>
</li>
<li><p>注意：此时MD文件，即文章开头需要设置toc属性——<code>toc: true</code></p>
<blockquote>
<figure class="highlight yml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br></pre></td><td class="code"><pre><span class="line"><span class="meta">---</span></span><br><span class="line"><span class="attr">title:</span> 				 <span class="comment">#文章标题</span></span><br><span class="line"><span class="attr">categories:</span>                       <span class="comment">#文章分類目錄 可以省略    </span></span><br><span class="line"><span class="attr">toc:</span> <span class="literal">true</span>                            <span class="comment">#目录 需要安装插件或者主题自带</span></span><br><span class="line"><span class="attr">date:</span>                                   <span class="comment">#文章日期</span></span><br><span class="line"><span class="attr">tags:</span>                                    <span class="comment">#标签</span></span><br><span class="line"><span class="meta">---</span></span><br></pre></td></tr></table></figure>
</blockquote>
</li>
</ul>
<h4 id="3-5-字体美化"><a href="#3-5-字体美化" class="headerlink" title="3.5 字体美化"></a>3.5 字体美化</h4><ul>
<li><p>代码字体美化、颜色设置</p>
</li>
<li><p>正文字体美化</p>
<blockquote>
<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">font</span> <span class="attr">color</span>=<span class="string">"purple"</span> <span class="attr">face</span>=<span class="string">"Microsoft YaHei"</span> <span class="attr">size</span>= <span class="string">5</span>&gt;</span><span class="tag">&lt;<span class="name">b</span>&gt;</span>content内容 <span class="tag">&lt;/<span class="name">b</span>&gt;</span><span class="tag">&lt;/<span class="name">font</span>&gt;</span></span><br></pre></td></tr></table></figure>

<p>修改文件路径为<code>theme\yilia\source\main.0cf68a.css</code></p>
<figure class="highlight css"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line"># <span class="selector-tag">font-family</span>:字体</span><br><span class="line"><span class="selector-tag">font-family</span> : <span class="selector-tag">Times</span> <span class="selector-tag">New</span> <span class="selector-tag">Roman</span></span><br><span class="line"></span><br><span class="line"># <span class="selector-class">.article-entry</span> <span class="selector-class">.highlight</span> <span class="selector-class">.line</span>(<span class="selector-tag">color</span>:<span class="selector-id">#FFF----</span>默认白色</span><br><span class="line"><span class="selector-class">.article-entry</span> <span class="selector-class">.highlight</span> <span class="selector-class">.line</span>(<span class="selector-tag">color</span> : 十六进制颜色</span><br></pre></td></tr></table></figure>
</blockquote>
</li>
</ul>
<hr>
<h3 id="4-博客主页美化"><a href="#4-博客主页美化" class="headerlink" title="4. 博客主页美化"></a>4. 博客主页美化</h3><h4 id="4-1-修改博客标题、子标题、用户"><a href="#4-1-修改博客标题、子标题、用户" class="headerlink" title="4.1 修改博客标题、子标题、用户"></a>4.1 修改博客标题、子标题、用户</h4><ul>
<li><p>修改文件路径为博客根路径下的<code>_config.yml</code></p>
<blockquote>
<figure class="highlight yml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># Site</span></span><br><span class="line"><span class="attr">title:</span> <span class="string">Chthollists的平凡之路</span></span><br><span class="line"><span class="attr">subtitle:</span> <span class="string">'今日物语'</span></span><br><span class="line"><span class="attr">description:</span> <span class="string">''</span></span><br><span class="line"><span class="attr">keywords:</span> <span class="string">xxx</span></span><br><span class="line"><span class="attr">author:</span> <span class="string">'xxx'</span></span><br><span class="line"><span class="comment"># 设置为英文 en</span></span><br><span class="line"><span class="attr">language:</span> <span class="string">Zh-cn</span></span><br><span class="line"><span class="attr">timezone:</span> <span class="string">''</span></span><br></pre></td></tr></table></figure>
</blockquote>
</li>
</ul>
<h4 id="4-2-主页左侧显示文章总数"><a href="#4-2-主页左侧显示文章总数" class="headerlink" title="4.2 主页左侧显示文章总数"></a>4.2 主页左侧显示文章总数</h4><ul>
<li><p>在<code>themes\yilia\layout\_partial\left-col.ejs</code>文件</p>
<blockquote>
<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br></pre></td><td class="code"><pre><span class="line"># 查找</span><br><span class="line"><span class="tag">&lt;<span class="name">nav</span> <span class="attr">class</span>=<span class="string">"header-menu"</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">ul</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">%</span> <span class="attr">for</span> (<span class="attr">var</span> <span class="attr">i</span> <span class="attr">in</span> <span class="attr">theme.menu</span>)&#123; %&gt;</span></span><br><span class="line">        <span class="tag">&lt;<span class="name">li</span>&gt;</span><span class="tag">&lt;<span class="name">a</span> <span class="attr">href</span>=<span class="string">"&lt;%- url_for(theme.menu[i]) %&gt;"</span>&gt;</span><span class="tag">&lt;<span class="name">%=</span> <span class="attr">i</span> %&gt;</span><span class="tag">&lt;/<span class="name">a</span>&gt;</span><span class="tag">&lt;/<span class="name">li</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">%&#125;%</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;/<span class="name">ul</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">nav</span>&gt;</span></span><br><span class="line"></span><br><span class="line"># 后面添加</span><br><span class="line"><span class="tag">&lt;<span class="name">nav</span>&gt;</span></span><br><span class="line">    总文章数 <span class="tag">&lt;<span class="name">%=site.posts.length%</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">nav</span>&gt;</span></span><br></pre></td></tr></table></figure>
</blockquote>
</li>
</ul>
<h4 id="4-3-设置个性签名"><a href="#4-3-设置个性签名" class="headerlink" title="4.3 设置个性签名"></a>4.3 设置个性签名</h4><ul>
<li><p>在 <code>themes/yilia/_config.yml</code>文件中，修改aboutme项</p>
<blockquote>
<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">aboutme: <span class="tag">&lt;<span class="name">font</span> <span class="attr">color</span>=<span class="string">"purple"</span> <span class="attr">face</span>=<span class="string">"Microsoft YaHei"</span> <span class="attr">size</span>= <span class="string">5</span>&gt;</span><span class="tag">&lt;<span class="name">b</span>&gt;</span>content内容<span class="tag">&lt;<span class="name">br</span>&gt;</span> <span class="tag">&lt;/<span class="name">b</span>&gt;</span><span class="tag">&lt;/<span class="name">font</span>&gt;</span></span><br></pre></td></tr></table></figure>
</blockquote>
</li>
</ul>
<hr>
<hr>
<h2 id="五、高级功能实现"><a href="#五、高级功能实现" class="headerlink" title="五、高级功能实现"></a>五、高级功能实现</h2><ul>
<li>各功能教程超链接汇总<ul>
<li><a href="http://dongshuyan.com/2019/05/24/hexo%E5%8D%9A%E5%AE%A2%E6%B3%A8%E6%84%8F%E4%BA%8B%E9%A1%B9/" target="_blank" rel="noopener">微信分享</a></li>
<li><a href="https://blog.csdn.net/qq_37939980/article/details/104390332" target="_blank" rel="noopener">版权信息</a></li>
<li><a href="https://blog.csdn.net/qq_40922859/article/details/97035497?utm_medium=distribute.pc_relevant.none-task-blog-BlogCommendFromMachineLearnPai2-2.channel_param&depth_1-utm_source=distribute.pc_relevant.none-task-blog-BlogCommendFromMachineLearnPai2-2.channel_param" target="_blank" rel="noopener">不蒜子统计</a></li>
<li><a href="https://blog.csdn.net/qq_40922859/article/details/97035497?utm_medium=distribute.pc_relevant.none-task-blog-BlogCommendFromMachineLearnPai2-2.channel_param&depth_1-utm_source=distribute.pc_relevant.none-task-blog-BlogCommendFromMachineLearnPai2-2.channel_param" target="_blank" rel="noopener">爱心功能、评论系统</a></li>
<li><a href="https://blog.csdn.net/weixin_41287260/article/details/97693850" target="_blank" rel="noopener">音乐功能、404页面、头像旋转</a></li>
<li><a href="https://github.com/iissnan/hexo-theme-next/wiki/%E5%88%9B%E5%BB%BA%E5%88%86%E7%B1%BB%E9%A1%B5%E9%9D%A2" target="_blank" rel="noopener">分类、随笔、标签</a></li>
<li><a href="https://blog.csdn.net/weixin_41287260/article/details/97693850" target="_blank" rel="noopener">字数统计、阅读时长</a></li>
<li><a href="http://dongshuyan.com/2019/05/24/hexo%E5%8D%9A%E5%AE%A2%E6%B3%A8%E6%84%8F%E4%BA%8B%E9%A1%B9/" target="_blank" rel="noopener">live2D、转载说明</a></li>
<li><a href="https://blog.csdn.net/qq_40922859/article/details/97035497?utm_medium=distribute.pc_relevant.none-task-blog-BlogCommendFromMachineLearnPai2-2.channel_param&depth_1-utm_source=distribute.pc_relevant.none-task-blog-BlogCommendFromMachineLearnPai2-2.channel_param" target="_blank" rel="noopener">文章加密</a></li>
<li><a href="http://dongshuyan.com/2019/05/24/hexo%E5%8D%9A%E5%AE%A2%E6%B3%A8%E6%84%8F%E4%BA%8B%E9%A1%B9/" target="_blank" rel="noopener">更多功能</a></li>
</ul>
</li>
</ul>
<h3 id="1-微信分享功能"><a href="#1-微信分享功能" class="headerlink" title="1. 微信分享功能"></a>1. 微信分享功能</h3><blockquote>
<p>初始时微信分享功能有问题</p>
<p>解决方法：修改<code>themes\yilia\layout\_partial\post\share.ejs</code>文件</p>
</blockquote>
<ul>
<li><p>由于百度云已经不支持二维码生成功能，修改share.ejs的度盘链接，改为qrserver.com的api</p>
<blockquote>
<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line"># 查找</span><br><span class="line">//pan.baidu.com/share/qrcode?url=</span><br><span class="line"></span><br><span class="line"># 修改为</span><br><span class="line">//api.qrserver.com/v1/create-qr-code/?size=150x150&amp;data=</span><br></pre></td></tr></table></figure>
</blockquote>
</li>
<li><p>查找share.ejs中的</p>
<blockquote>
<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br></pre></td><td class="code"><pre><span class="line"># 查找</span><br><span class="line">var sUrl = url.replace(/index\.html$/, '');</span><br><span class="line">  sUrl = /^(http:|https:)\/\//.test(sUrl) ? sUrl : 'http:' + sUrl;</span><br><span class="line">  </span><br><span class="line"># 后面添加</span><br><span class="line"># 20与博客地址的长度相关</span><br><span class="line">test=sUrl.substring(20);</span><br></pre></td></tr></table></figure>
</blockquote>
</li>
<li><p>再将share.ejs中的</p>
<blockquote>
<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line"># 查找</span><br><span class="line">'//api.qrserver.com/v1/create-qr-code/?size=150x150&amp;data=' + sUrl</span><br><span class="line"></span><br><span class="line"># 改为</span><br><span class="line">'//api.qrserver.com/v1/create-qr-code/?size=150x150&amp;data=你的主页网址' + test</span><br></pre></td></tr></table></figure>
</blockquote>
</li>
<li><p>最终结果</p>
<blockquote>
<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br></pre></td><td class="code"><pre><span class="line"># 修改后代码</span><br><span class="line"><span class="tag">&lt;<span class="name">div</span> <span class="attr">class</span>=<span class="string">"page-modal wx-share js-wx-box"</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">a</span> <span class="attr">class</span>=<span class="string">"close js-modal-close"</span> <span class="attr">href</span>=<span class="string">"javascript:;"</span>&gt;</span><span class="tag">&lt;<span class="name">i</span> <span class="attr">class</span>=<span class="string">"icon icon-close"</span>&gt;</span><span class="tag">&lt;/<span class="name">i</span>&gt;</span><span class="tag">&lt;/<span class="name">a</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">p</span>&gt;</span>扫一扫，分享到微信<span class="tag">&lt;/<span class="name">p</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">div</span> <span class="attr">class</span>=<span class="string">"wx-qrcode"</span>&gt;</span></span><br><span class="line">      <span class="tag">&lt;<span class="name">img</span> <span class="attr">src</span>=<span class="string">"&lt;%- 'qrcode' in locals ? qrcode(sUrl) : '//api.qrserver.com/v1/create-qr-code/?size=150x150&amp;data=https://damonxiang.github.io' + test  %&gt;"</span> <span class="attr">alt</span>=<span class="string">"微信分享二维码"</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;/<span class="name">div</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">div</span>&gt;</span></span><br></pre></td></tr></table></figure>
</blockquote>
</li>
</ul>
<hr>
<h3 id="2-文章置顶功能"><a href="#2-文章置顶功能" class="headerlink" title="2. 文章置顶功能"></a>2. 文章置顶功能</h3><h4 id="2-1-安装插件"><a href="#2-1-安装插件" class="headerlink" title="2.1 安装插件"></a>2.1 安装插件</h4><ul>
<li><p>安装 hexo-generator-index-pin-top 模块</p>
<blockquote>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">npm uninstall hexo-generator-index --save</span><br><span class="line">npm install hexo-generator-index-pin-top --save</span><br></pre></td></tr></table></figure>
</blockquote>
</li>
</ul>
<h4 id="2-2-配置置顶标准"><a href="#2-2-配置置顶标准" class="headerlink" title="2.2 配置置顶标准"></a>2.2 配置置顶标准</h4><ul>
<li><p>打开<code>/themes/yilia/layout/post.ejs</code>在最前面加入代码</p>
<blockquote>
<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">%</span> <span class="attr">if</span> (<span class="attr">page.top</span>) &#123; %&gt;</span></span><br><span class="line">  <span class="tag">&lt;<span class="name">i</span> <span class="attr">class</span>=<span class="string">"fa fa-thumb-tack"</span>&gt;</span><span class="tag">&lt;/<span class="name">i</span>&gt;</span></span><br><span class="line">  <span class="tag">&lt;<span class="name">font</span> <span class="attr">color</span>=<span class="string">7D26CD</span>&gt;</span>置顶<span class="tag">&lt;/<span class="name">font</span>&gt;</span></span><br><span class="line">  <span class="tag">&lt;<span class="name">span</span> <span class="attr">class</span>=<span class="string">"post-meta-divider"</span>&gt;</span>|<span class="tag">&lt;/<span class="name">span</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">%</span> &#125; %&gt;</span></span><br></pre></td></tr></table></figure>
</blockquote>
</li>
</ul>
<h4 id="2-3-配置文章"><a href="#2-3-配置文章" class="headerlink" title="2.3 配置文章"></a>2.3 配置文章</h4><ul>
<li><p>在需要置顶的文章的Front-matter中加上top属性</p>
<blockquote>
<p>top后面的数字越大，优先级越高</p>
<figure class="highlight yml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line"><span class="meta">---</span></span><br><span class="line"><span class="attr">title:</span> <span class="string">博客简介</span></span><br><span class="line"><span class="attr">date:</span> <span class="string">xxx</span></span><br><span class="line"><span class="attr">top:</span> <span class="number">5</span></span><br><span class="line"><span class="meta">---</span></span><br></pre></td></tr></table></figure>
</blockquote>
</li>
</ul>
<h4 id="2-4-优先级配置"><a href="#2-4-优先级配置" class="headerlink" title="2.4 优先级配置"></a>2.4 优先级配置</h4><ul>
<li><p>修改根目录配置文件/_config.yml,top值-1标示根据top值倒序（正序设置为1即可），同样date也是根据创建日期倒序。</p>
<blockquote>
<figure class="highlight yml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># 查找</span></span><br><span class="line"><span class="attr">index_generator:</span></span><br><span class="line">  <span class="attr">path:</span> <span class="string">''</span></span><br><span class="line">  <span class="attr">per_page:</span> <span class="number">10</span></span><br><span class="line">  <span class="attr">order_by:</span> <span class="string">-date</span></span><br><span class="line">  </span><br><span class="line"><span class="comment"># 改为</span></span><br><span class="line"><span class="attr">index_generator:</span></span><br><span class="line">  <span class="attr">path:</span> <span class="string">''</span></span><br><span class="line">  <span class="attr">per_page:</span> <span class="number">10</span></span><br><span class="line">  <span class="attr">order_by:</span></span><br><span class="line">    <span class="attr">top:</span> <span class="number">-1</span></span><br><span class="line">    <span class="attr">date:</span> <span class="number">-1</span></span><br></pre></td></tr></table></figure>
</blockquote>
</li>
</ul>
<hr>
<h3 id="3-文章标签分类功能"><a href="#3-文章标签分类功能" class="headerlink" title="3. 文章标签分类功能"></a>3. 文章标签分类功能</h3><h4 id="3-1-文章分类功能"><a href="#3-1-文章分类功能" class="headerlink" title="3.1 文章分类功能"></a>3.1 文章分类功能</h4><ul>
<li><p>通过hexo新建一个页面，命名为 categories </p>
<blockquote>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">hexo new page categoties</span><br></pre></td></tr></table></figure>
</blockquote>
</li>
<li><p>编辑刚新建的页面，将页面的类型<code>type</code>设置为 categories ，主题将自动为这个页面显示所有分类。</p>
<blockquote>
<p>通过设置categoties，并在menu中添加对应链接来实现博文分类</p>
<p>categoties是不同级的，适合纵向文件分类    </p>
<figure class="highlight yml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line"><span class="attr">title:</span> <span class="string">分类</span></span><br><span class="line"><span class="attr">date:</span> <span class="number">2020</span><span class="number">-07</span><span class="number">-29</span> <span class="number">10</span><span class="string">:36:40</span></span><br><span class="line"><span class="attr">type:</span> <span class="string">"categories"</span></span><br><span class="line"><span class="attr">comments:</span> <span class="literal">false</span></span><br></pre></td></tr></table></figure>
</blockquote>
</li>
<li><p>菜单中添加链接。编辑主题的<code>_config.yml</code> ，将categories添加到menu中</p>
<blockquote>
<figure class="highlight yml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line"><span class="attr">menu:</span></span><br><span class="line">  <span class="attr">home:</span> <span class="string">/</span></span><br><span class="line">  <span class="attr">categories:</span> <span class="string">/categories</span></span><br><span class="line">  <span class="attr">archives:</span> <span class="string">/archives</span></span><br><span class="line">  <span class="attr">tags:</span> <span class="string">/tags</span></span><br></pre></td></tr></table></figure>
</blockquote>
</li>
</ul>
<h4 id="3-2-文章标签分类功能"><a href="#3-2-文章标签分类功能" class="headerlink" title="3.2 文章标签分类功能"></a>3.2 文章标签分类功能</h4><ul>
<li><p>MarkDown 各种标签设置</p>
<blockquote>
<p>通过设置tags，并在menu中添加对应链接来实现博文分类   </p>
<p>tags标签是同级的，适合横向文件分类 </p>
<figure class="highlight yml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br></pre></td><td class="code"><pre><span class="line"><span class="meta">---</span></span><br><span class="line"><span class="attr">title:</span> 				 <span class="comment">#文章标题</span></span><br><span class="line"><span class="attr">subtitle:</span>                            <span class="comment">#子标题</span></span><br><span class="line"><span class="attr">categories:</span>                       <span class="comment">#文章分類目錄 可以省略    </span></span><br><span class="line"><span class="attr">toc:</span> <span class="literal">true</span>                            <span class="comment">#目录 需要安装插件或者主题自带</span></span><br><span class="line"><span class="attr">reward:</span> <span class="literal">true</span>                      <span class="comment">#打赏 需要安装插件或者主题自带</span></span><br><span class="line"><span class="attr">declare:</span> <span class="literal">true</span>                      <span class="comment">#版权 需要安装插件或者主题自带</span></span><br><span class="line"><span class="attr">date:</span>                                   <span class="comment">#文章日期</span></span><br><span class="line"><span class="attr">header-img:</span>                        <span class="comment">#顶部背景图片</span></span><br><span class="line"><span class="attr">tags:</span>                                    <span class="comment">#标签</span></span><br><span class="line"><span class="meta">---</span></span><br></pre></td></tr></table></figure>
</blockquote>
</li>
</ul>
<hr>
<h3 id="4-添加404网页"><a href="#4-添加404网页" class="headerlink" title="4. 添加404网页"></a>4. 添加404网页</h3><ul>
<li><p>参考：<a href="https://docs.github.com/cn/github/working-with-github-pages/creating-a-custom-404-page-for-your-github-pages-site" target="_blank" rel="noopener">自定义Github Pages</a></p>
</li>
<li><p>在<code>/source/</code>目录下新建<code>404.md</code>在头部添加属性<code>permalink: /404.html</code>，页面内容可以自定义。</p>
<blockquote>
<p>推荐使用<a href="https://www.qq.com/404/" target="_blank" rel="noopener">腾讯公益404页面</a>（注意要把首页链接换成自己的）</p>
<p><code>404.md</code>文件内容</p>
<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br></pre></td><td class="code"><pre><span class="line">---</span><br><span class="line"># example 404.md </span><br><span class="line"></span><br><span class="line">title: 404 Not Found：该页无法显示 </span><br><span class="line"></span><br><span class="line">date: 2019-07-26 21:51:29 </span><br><span class="line"></span><br><span class="line">permalink: /404.html</span><br><span class="line">---</span><br><span class="line"></span><br><span class="line"><span class="meta">&lt;!DOCTYPE <span class="meta-keyword">html</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">html</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">head</span>&gt;</span></span><br><span class="line">        <span class="tag">&lt;<span class="name">meta</span> <span class="attr">charset</span>=<span class="string">"UTF-8"</span> /&gt;</span></span><br><span class="line">        <span class="tag">&lt;<span class="name">title</span>&gt;</span>404<span class="tag">&lt;/<span class="name">title</span>&gt;</span>                              </span><br><span class="line">    <span class="tag">&lt;/<span class="name">head</span>&gt;</span>    </span><br><span class="line">    <span class="tag">&lt;<span class="name">body</span>&gt;</span></span><br><span class="line">        <span class="tag">&lt;<span class="name">script</span> <span class="attr">type</span>=<span class="string">"text/javascript"</span> <span class="attr">src</span>=<span class="string">"//qzonestyle.gtimg.cn/qzone/hybrid/app/404/search_children.js"</span> <span class="attr">homePageName</span>=<span class="string">"返回首页"</span> <span class="attr">homePageUrl</span>=<span class="string">"https://chthollists.github.io/"</span>&gt;</span><span class="tag">&lt;/<span class="name">script</span>&gt;</span> </span><br><span class="line">    <span class="tag">&lt;/<span class="name">body</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">html</span>&gt;</span></span><br></pre></td></tr></table></figure>
</blockquote>
</li>
</ul>
<hr>
<h3 id="5-头像旋转功能"><a href="#5-头像旋转功能" class="headerlink" title="5. 头像旋转功能"></a>5. 头像旋转功能</h3><ul>
<li><p>在<code>themes\yilia\source\</code>文件夹下增加一个css文件<code>avatarrotation.css</code>用来旋转360度</p>
<blockquote>
<p><code>avatarrotation.css</code>内容</p>
<figure class="highlight css"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br></pre></td><td class="code"><pre><span class="line"><span class="selector-class">.left-col</span> <span class="selector-id">#header</span> <span class="selector-class">.profilepic</span> <span class="selector-tag">img</span> &#123;</span><br><span class="line">	<span class="comment">/* 控制旋转速度时间*/</span></span><br><span class="line">  <span class="attribute">-webkit-transition</span>: -webkit-transform <span class="number">1.0s</span> ease-out;</span><br><span class="line">  <span class="attribute">-moz-transition</span>: -moz-transform <span class="number">1.0s</span> ease-out;</span><br><span class="line">  <span class="attribute">transition</span>: transform <span class="number">1.0s</span> ease-out;</span><br><span class="line">&#125;</span><br><span class="line"><span class="selector-class">.left-col</span> <span class="selector-id">#header</span> <span class="selector-class">.profilepic</span> <span class="selector-tag">img</span><span class="selector-pseudo">:hover</span> &#123;</span><br><span class="line">	<span class="comment">/* 鼠标经过360% */</span></span><br><span class="line">  <span class="attribute">-webkit-transform</span>: <span class="built_in">rotateZ</span>(<span class="number">360deg</span>);</span><br><span class="line">  <span class="attribute">-moz-transform</span>: <span class="built_in">rotateZ</span>(<span class="number">360deg</span>);</span><br><span class="line">  <span class="attribute">transform</span>: <span class="built_in">rotateZ</span>(<span class="number">360deg</span>);</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
</blockquote>
</li>
<li><p>然后在<code>themes\yilia\layout\_partial\head.ejs</code>文件中添加进去创建的<code>css</code>文件：<br>找到<code>&lt;%- partial(&#39;css&#39;) %&gt;</code>，在它的下面添加代码，把刚才写的文件添加进去，</p>
<blockquote>
<p><strong>注意！！是在它的下面添加，不然旋转速度将不会生效</strong></p>
<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">%</span> <span class="attr">if</span> (<span class="attr">theme.avatarrotation</span>)&#123; %&gt;</span></span><br><span class="line">	<span class="tag">&lt;<span class="name">link</span> <span class="attr">rel</span>=<span class="string">"stylesheet"</span> <span class="attr">type</span>=<span class="string">"text/css"</span> <span class="attr">href</span>=<span class="string">"/./avatarrotation.css"</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">%</span> &#125; %&gt;</span></span><br></pre></td></tr></table></figure>
</blockquote>
</li>
<li><p>最后在<code>theme\_config.yml</code>中添加</p>
<blockquote>
<figure class="highlight yml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment">#头像是否旋转(如果不要旋转取false)</span></span><br><span class="line"><span class="attr">avatarrotation:</span> <span class="literal">true</span></span><br></pre></td></tr></table></figure>
</blockquote>
</li>
</ul>
<hr>
<h3 id="6-修改默认文章格式"><a href="#6-修改默认文章格式" class="headerlink" title="6. 修改默认文章格式"></a>6. 修改默认文章格式</h3><blockquote>
<p>修改hexo new “article” 的Front-matter的属性</p>
</blockquote>
<ul>
<li><p>修改根目录下的<code>scaffolds</code>文件夹的post.md`</p>
<blockquote>
<figure class="highlight yml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br></pre></td><td class="code"><pre><span class="line"><span class="attr">title:</span> <span class="string">&#123;&#123;</span> <span class="string">title</span> <span class="string">&#125;&#125;</span></span><br><span class="line"><span class="attr">date:</span> <span class="string">&#123;&#123;</span> <span class="string">date</span> <span class="string">&#125;&#125;</span></span><br><span class="line"><span class="attr">subtitle:</span>                         <span class="comment">#子标题</span></span><br><span class="line"><span class="attr">categories:</span>                       <span class="comment">#文章分類目錄 可以省略    </span></span><br><span class="line"><span class="attr">toc:</span> <span class="literal">true</span>                         <span class="comment">#目录 需要安装插件或者主题自带</span></span><br><span class="line"><span class="attr">reward:</span> <span class="literal">true</span>                      <span class="comment">#打赏 需要安装插件或者主题自带</span></span><br><span class="line"><span class="attr">declare:</span> <span class="literal">true</span>                     <span class="comment">#版权 需要安装插件或者主题自带</span></span><br><span class="line"><span class="attr">header-img:</span>                       <span class="comment">#顶部背景图片</span></span><br><span class="line"><span class="attr">top:</span> </span><br><span class="line"><span class="attr">password:</span> </span><br><span class="line"><span class="attr">abstract:</span> </span><br><span class="line"><span class="attr">message:</span> </span><br><span class="line"><span class="attr">tags:</span>                             <span class="comment">#标签</span></span><br></pre></td></tr></table></figure>
</blockquote>
</li>
</ul>
<hr>
<h3 id="7-不蒜子统计功能"><a href="#7-不蒜子统计功能" class="headerlink" title="7. 不蒜子统计功能"></a>7. 不蒜子统计功能</h3><h4 id="7-1-安装不蒜子统计脚本"><a href="#7-1-安装不蒜子统计脚本" class="headerlink" title="7.1 安装不蒜子统计脚本"></a>7.1 安装不蒜子统计脚本</h4><ul>
<li><p><a href="http://busuanzi.ibruce.info/" target="_blank" rel="noopener">不蒜子官网</a></p>
</li>
<li><p>不蒜子用来统计博客的访问量在<code>themes\yilia\layout\_partial\after-footer.ejs</code>文件最后添加</p>
<blockquote>
<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">script</span>  <span class="attr">async</span>  <span class="attr">src</span>=<span class="string">"https://busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"</span>&gt;</span><span class="tag">&lt;/<span class="name">script</span>&gt;</span></span><br></pre></td></tr></table></figure>
</blockquote>
</li>
</ul>
<h4 id="7-2-博客访问量统计"><a href="#7-2-博客访问量统计" class="headerlink" title="7.2 博客访问量统计"></a>7.2 博客访问量统计</h4><ul>
<li><p>在<code>themes\yilia\layout\_partial\footer.ejs</code>中</p>
<blockquote>
<p>在<code>&lt;div class=&quot;footer-right&quot;&gt;</code>标签内添加：</p>
<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment">&lt;!-- # PV方式，单个用户连续点击 n 篇，记录 n 次记录值 --&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">span</span> <span class="attr">id</span>=<span class="string">"busuanzi_container_site_pv"</span>&gt;</span> 总访问量: <span class="tag">&lt;<span class="name">span</span> <span class="attr">id</span>=<span class="string">"busuanzi_value_site_pv"</span>&gt;</span><span class="tag">&lt;/<span class="name">span</span>&gt;</span> /<span class="tag">&lt;/<span class="name">span</span>&gt;</span></span><br><span class="line"><span class="comment">&lt;!-- # UV方式，单个用户连续点击 n 篇，记录 1 次记录值 --&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">span</span> <span class="attr">id</span>=<span class="string">"busuanzi_container_site_uv"</span>&gt;</span>  访客数:<span class="tag">&lt;<span class="name">span</span> <span class="attr">id</span>=<span class="string">"busuanzi_value_site_uv"</span>&gt;</span><span class="tag">&lt;/<span class="name">span</span>&gt;</span><span class="tag">&lt;/<span class="name">span</span>&gt;</span></span><br></pre></td></tr></table></figure>
</blockquote>
</li>
<li><p>美化显示</p>
<blockquote>
<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">font</span> <span class="attr">color</span>=<span class="string">"red"</span> <span class="attr">face</span>=<span class="string">"Microsoft YaHei"</span> <span class="attr">size</span>= <span class="string">3</span>&gt;</span><span class="tag">&lt;<span class="name">b</span>&gt;</span> 内容：<span class="tag">&lt;<span class="name">%=content%</span>&gt;</span><span class="tag">&lt;/<span class="name">b</span>&gt;</span><span class="tag">&lt;/<span class="name">font</span>&gt;</span></span><br></pre></td></tr></table></figure>

<p>内容：&lt;%=content%&gt;根据需求改变</p>
</blockquote>
</li>
</ul>
<h4 id="7-3-单篇文章点击量统计方法一"><a href="#7-3-单篇文章点击量统计方法一" class="headerlink" title="7.3 单篇文章点击量统计方法一"></a>7.3 单篇文章点击量统计方法一</h4><ul>
<li><p>在<code>themes/yilia/layout/_partial/article.ejs</code>中</p>
<blockquote>
<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">%-</span> <span class="attr">partial</span>('<span class="attr">post</span>/<span class="attr">title</span>', &#123;<span class="attr">class_name:</span> '<span class="attr">article-title</span>'&#125;) %&gt;</span></span><br></pre></td></tr></table></figure>

<p>后面添加如下代码：</p>
<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment">&lt;!--显示阅读次数--&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">%</span> <span class="attr">if</span> (!<span class="attr">index</span> &amp;&amp; <span class="attr">post.comments</span>)&#123; %&gt;</span></span><br><span class="line">  <span class="tag">&lt;<span class="name">br</span>/&gt;</span></span><br><span class="line">  <span class="tag">&lt;<span class="name">a</span> <span class="attr">class</span>=<span class="string">"cloud-tie-join-count"</span> <span class="attr">href</span>=<span class="string">"javascript:void(0);"</span> <span class="attr">style</span>=<span class="string">"color:gray;font-size:14px;"</span>&gt;</span></span><br><span class="line">  <span class="tag">&lt;<span class="name">span</span> <span class="attr">class</span>=<span class="string">"icon-sort"</span>&gt;</span><span class="tag">&lt;/<span class="name">span</span>&gt;</span></span><br><span class="line">  <span class="tag">&lt;<span class="name">span</span> <span class="attr">id</span>=<span class="string">"busuanzi_container_page_pv"</span> <span class="attr">style</span>=<span class="string">"color:#ef7522;font-size:14px;"</span>&gt;</span></span><br><span class="line">            阅读数: <span class="tag">&lt;<span class="name">span</span> <span class="attr">id</span>=<span class="string">"busuanzi_value_page_pv"</span>&gt;</span><span class="tag">&lt;/<span class="name">span</span>&gt;</span>次 <span class="symbol">&amp;nbsp;</span><span class="symbol">&amp;nbsp;</span></span><br><span class="line">  <span class="tag">&lt;/<span class="name">span</span>&gt;</span></span><br><span class="line">  <span class="tag">&lt;/<span class="name">a</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">%</span> &#125; %&gt;</span></span><br><span class="line"><span class="comment">&lt;!--显示阅读次数完毕--&gt;</span></span><br></pre></td></tr></table></figure>
</blockquote>
</li>
</ul>
<h4 id="7-4-单篇文章点击量统计方法二"><a href="#7-4-单篇文章点击量统计方法二" class="headerlink" title="7.4 单篇文章点击量统计方法二"></a>7.4 单篇文章点击量统计方法二</h4><ul>
<li><p>找到<code>themes\yilia\layout\_partial\post\nav.ejs</code>，注释掉以下两行：大概在27行左右(无此代码请忽略)</p>
<blockquote>
<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">span</span> <span class="attr">class</span>=<span class="string">"post-meta-item-text"</span>&gt;</span>本文阅读量 <span class="tag">&lt;/<span class="name">span</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">span</span> <span class="attr">class</span>=<span class="string">"leancloud-visitors-count"</span>&gt;</span>8848<span class="tag">&lt;/<span class="name">span</span>&gt;</span></span><br></pre></td></tr></table></figure>

<p>注释掉之后直接在这两行下面加上：</p>
<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">span</span> <span class="attr">id</span>=<span class="string">"busuanzi_container_page_pv"</span>&gt;</span></span><br><span class="line">        本文阅读量: <span class="tag">&lt;<span class="name">span</span> <span class="attr">id</span>=<span class="string">"busuanzi_value_page_pv"</span>&gt;</span><span class="tag">&lt;/<span class="name">span</span>&gt;</span>次</span><br><span class="line"> <span class="tag">&lt;/<span class="name">span</span>&gt;</span></span><br></pre></td></tr></table></figure>
</blockquote>
</li>
</ul>
<h4 id="7-5-不蒜子统计与Live2D冲突问题"><a href="#7-5-不蒜子统计与Live2D冲突问题" class="headerlink" title="7.5 不蒜子统计与Live2D冲突问题"></a>7.5 不蒜子统计与Live2D冲突问题</h4><ul>
<li><p>参考：<a href="https://boyinthesun.cn/post/error-live2d-busuanzi/" target="_blank" rel="noopener">不蒜子功能失效</a></p>
</li>
<li><p>问题：当配置了Live2D功能后，不蒜子统计功能会与其发生冲突从而失效</p>
</li>
<li><p>分析：查看网页源码Ctrl+u，可以发现：</p>
<ul>
<li><p>不蒜子功能正常时</p>
<blockquote>
<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br></pre></td><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">span</span> <span class="attr">id</span>=<span class="string">"busuanzi_container_site_pv"</span>&gt;</span></span><br><span class="line">    |<span class="symbol">&amp;nbsp;</span><span class="tag">&lt;<span class="name">i</span> <span class="attr">class</span>=<span class="string">"far fa-eye"</span>&gt;</span><span class="tag">&lt;/<span class="name">i</span>&gt;</span><span class="symbol">&amp;nbsp;</span>总访问量:<span class="symbol">&amp;nbsp;</span><span class="tag">&lt;<span class="name">span</span> <span class="attr">id</span>=<span class="string">"busuanzi_value_site_pv"</span></span></span><br><span class="line"><span class="tag">        <span class="attr">class</span>=<span class="string">"white-color"</span>&gt;</span><span class="tag">&lt;/<span class="name">span</span>&gt;</span><span class="symbol">&amp;nbsp;</span>次</span><br><span class="line">    <span class="tag">&lt;/<span class="name">span</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">span</span> <span class="attr">id</span>=<span class="string">"busuanzi_container_site_uv"</span>&gt;</span></span><br><span class="line">    |<span class="symbol">&amp;nbsp;</span><span class="tag">&lt;<span class="name">i</span> <span class="attr">class</span>=<span class="string">"fas fa-users"</span>&gt;</span><span class="tag">&lt;/<span class="name">i</span>&gt;</span><span class="symbol">&amp;nbsp;</span>总访问人数:<span class="symbol">&amp;nbsp;</span><span class="tag">&lt;<span class="name">span</span> <span class="attr">id</span>=<span class="string">"busuanzi_value_site_uv"</span></span></span><br><span class="line"><span class="tag">        <span class="attr">class</span>=<span class="string">"white-color"</span>&gt;</span><span class="tag">&lt;/<span class="name">span</span>&gt;</span><span class="symbol">&amp;nbsp;</span>人</span><br><span class="line">    <span class="tag">&lt;/<span class="name">span</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">span</span>&gt;</span></span><br></pre></td></tr></table></figure>
</blockquote>
</li>
<li><p>不蒜子功能失效时</p>
<blockquote>
<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br></pre></td><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">span</span> <span class="attr">id</span>=<span class="string">"busuanzi_container_site_pv"</span> <span class="attr">style</span>=<span class="string">"display: none;"</span>&gt;</span></span><br><span class="line">    |<span class="symbol">&amp;nbsp;</span><span class="tag">&lt;<span class="name">i</span> <span class="attr">class</span>=<span class="string">"far fa-eye"</span>&gt;</span><span class="tag">&lt;/<span class="name">i</span>&gt;</span><span class="symbol">&amp;nbsp;</span>总访问量:<span class="symbol">&amp;nbsp;</span><span class="tag">&lt;<span class="name">span</span> <span class="attr">id</span>=<span class="string">"busuanzi_value_site_pv"</span> </span></span><br><span class="line"><span class="tag">        <span class="attr">class</span>=<span class="string">"white-color"</span>&gt;</span>2303950<span class="tag">&lt;/<span class="name">span</span>&gt;</span><span class="symbol">&amp;nbsp;</span>次</span><br><span class="line"><span class="tag">&lt;/<span class="name">span</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">span</span> <span class="attr">id</span>=<span class="string">"busuanzi_container_site_uv"</span> <span class="attr">style</span>=<span class="string">"display: none;"</span>&gt;</span></span><br><span class="line">    |<span class="symbol">&amp;nbsp;</span><span class="tag">&lt;<span class="name">i</span> <span class="attr">class</span>=<span class="string">"fas fa-users"</span>&gt;</span><span class="tag">&lt;/<span class="name">i</span>&gt;</span><span class="symbol">&amp;nbsp;</span>总访问人数:<span class="symbol">&amp;nbsp;</span><span class="tag">&lt;<span class="name">span</span> <span class="attr">id</span>=<span class="string">"busuanzi_value_site_uv"</span> </span></span><br><span class="line"><span class="tag">        <span class="attr">class</span>=<span class="string">"white-color"</span>&gt;</span>160644<span class="tag">&lt;/<span class="name">span</span>&gt;</span><span class="symbol">&amp;nbsp;</span>人</span><br><span class="line"><span class="tag">&lt;/<span class="name">span</span>&gt;</span></span><br></pre></td></tr></table></figure>
</blockquote>
</li>
<li><p>所以导致失效的原因是多了一个display的属性值变成了none，从而不显示不蒜子统计</p>
<blockquote>
<figure class="highlight js"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">style=<span class="string">"display: none;"</span></span><br></pre></td></tr></table></figure>
</blockquote>
</li>
</ul>
</li>
<li><p>解决办法：</p>
<ul>
<li><p>打开不蒜子官网上的<a href="https://busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js" target="_blank" rel="noopener">busuanzi.pure.mini.js</a>文件，将其下载到本地，放到yilia主题下的路径中</p>
<blockquote>
<p>如：<code>theme/yilia/source</code>路径</p>
</blockquote>
</li>
<li><p>修改busuanzi.pure.mini.js文件</p>
<blockquote>
<figure class="highlight js"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line"># 找到</span><br><span class="line">b.style.display=<span class="string">"none"</span></span><br><span class="line"></span><br><span class="line"># 改为</span><br><span class="line">b.style.display=<span class="string">''</span></span><br></pre></td></tr></table></figure>
</blockquote>
</li>
<li><p>修改不蒜子统计的调用语句</p>
<blockquote>
<p>原来是从不蒜子统计的服务器上调用busuanzi.pure.mini.js</p>
<p>现在直接从本地调用，还可以避免不蒜子官网域名改变导致的功能失效问题</p>
</blockquote>
<blockquote>
<p>路径：<code>themes\yilia\layout\_partial\after-footer.ejs</code></p>
<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line"># 原始</span><br><span class="line"><span class="tag">&lt;<span class="name">script</span>  <span class="attr">async</span>  <span class="attr">src</span>=<span class="string">"https://busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"</span>&gt;</span><span class="tag">&lt;/<span class="name">script</span>&gt;</span></span><br><span class="line"></span><br><span class="line"># 修改为本地路径：/busuanzi.pure.mini.js</span><br><span class="line"><span class="tag">&lt;<span class="name">script</span>  <span class="attr">async</span>  <span class="attr">src</span>=<span class="string">"/busuanzi.pure.mini.js"</span>&gt;</span><span class="tag">&lt;/<span class="name">script</span>&gt;</span></span><br></pre></td></tr></table></figure>
</blockquote>
</li>
</ul>
</li>
</ul>
<hr>
<h3 id="8-字数统计和阅读时长功能"><a href="#8-字数统计和阅读时长功能" class="headerlink" title="8. 字数统计和阅读时长功能"></a>8. 字数统计和阅读时长功能</h3><h4 id="8-1-字数统计"><a href="#8-1-字数统计" class="headerlink" title="8.1 字数统计"></a>8.1 字数统计</h4><ul>
<li><p>安装插件 hexo-wordcount</p>
<blockquote>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">npm i -save hexo-wordcount</span><br></pre></td></tr></table></figure>
</blockquote>
</li>
<li><p>博客根目录<code>_config.yml</code>添加配置</p>
<blockquote>
<figure class="highlight yml"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><span class="attr">word_count:</span> <span class="literal">true</span></span><br></pre></td></tr></table></figure>
</blockquote>
</li>
<li><p>修改<code>themes\yilia\layout\_partial\article.ejs</code></p>
<blockquote>
<p>查找</p>
<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">%-</span> <span class="attr">partial</span>('<span class="attr">post</span>/<span class="attr">date</span>', &#123;<span class="attr">class_name:</span> '<span class="attr">archive-article-date</span>', <span class="attr">date_format:</span> <span class="attr">null</span>&#125;) %&gt;</span></span><br></pre></td></tr></table></figure>

<p>后面添加</p>
<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">%</span> <span class="attr">if</span>(<span class="attr">theme.word_count</span> &amp;&amp; !<span class="attr">post.no_word_count</span>)&#123;%&gt;</span></span><br><span class="line">          <span class="tag">&lt;<span class="name">%-</span> <span class="attr">partial</span>('<span class="attr">post</span>/<span class="attr">word</span>') %&gt;</span></span><br><span class="line">          <span class="tag">&lt;<span class="name">%</span> &#125; %&gt;</span></span><br></pre></td></tr></table></figure>
</blockquote>
</li>
<li><p>最后在<code>themes\yilia\layout\_partial\post</code>目录下新建<code>word.ejs</code>,内容如下</p>
<blockquote>
<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br></pre></td><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">div</span> <span class="attr">style</span>=<span class="string">"margin-top:10px;"</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">span</span> <span class="attr">class</span>=<span class="string">"post-time"</span>&gt;</span></span><br><span class="line">      <span class="tag">&lt;<span class="name">span</span> <span class="attr">class</span>=<span class="string">"post-meta-item-icon"</span>&gt;</span></span><br><span class="line">        <span class="tag">&lt;<span class="name">i</span> <span class="attr">class</span>=<span class="string">"fa fa-keyboard-o"</span>&gt;</span><span class="tag">&lt;/<span class="name">i</span>&gt;</span></span><br><span class="line">        <span class="tag">&lt;<span class="name">span</span> <span class="attr">class</span>=<span class="string">"post-meta-item-text"</span> <span class="attr">style</span>=<span class="string">"font-size: 16px;color: grey"</span>&gt;</span>  字数统计: <span class="tag">&lt;/<span class="name">span</span>&gt;</span></span><br><span class="line">        <span class="comment">&lt;!--这里样式可以自己定制--&gt;</span></span><br><span class="line">        <span class="tag">&lt;<span class="name">span</span> <span class="attr">class</span>=<span class="string">"post-count"</span> <span class="attr">style</span>=<span class="string">"font-size: 16px;color: grey"</span>&gt;</span><span class="tag">&lt;<span class="name">%=</span> <span class="attr">wordcount</span>(<span class="attr">post.content</span>) %&gt;</span>字<span class="tag">&lt;/<span class="name">span</span>&gt;</span></span><br><span class="line">      <span class="tag">&lt;/<span class="name">span</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;/<span class="name">span</span>&gt;</span></span><br><span class="line"></span><br><span class="line">    <span class="tag">&lt;<span class="name">span</span> <span class="attr">class</span>=<span class="string">"post-time"</span>&gt;</span></span><br><span class="line">      <span class="symbol">&amp;nbsp;</span> | <span class="symbol">&amp;nbsp;</span></span><br><span class="line">      <span class="tag">&lt;<span class="name">span</span> <span class="attr">class</span>=<span class="string">"post-meta-item-icon"</span>&gt;</span></span><br><span class="line">        <span class="tag">&lt;<span class="name">i</span> <span class="attr">class</span>=<span class="string">"fa fa-hourglass-half"</span>&gt;</span><span class="tag">&lt;/<span class="name">i</span>&gt;</span></span><br><span class="line">        <span class="tag">&lt;<span class="name">span</span> <span class="attr">class</span>=<span class="string">"post-meta-item-text"</span> <span class="attr">style</span>=<span class="string">"font-size: 16px;color: grey"</span>&gt;</span>  阅读时长: <span class="tag">&lt;/<span class="name">span</span>&gt;</span></span><br><span class="line">        <span class="tag">&lt;<span class="name">span</span> <span class="attr">class</span>=<span class="string">"post-count"</span> <span class="attr">style</span>=<span class="string">"font-size: 16px;color: grey"</span>&gt;</span><span class="tag">&lt;<span class="name">%=</span> <span class="attr">min2read</span>(<span class="attr">post.content</span>) %&gt;</span>分<span class="tag">&lt;/<span class="name">span</span>&gt;</span></span><br><span class="line">      <span class="tag">&lt;/<span class="name">span</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;/<span class="name">span</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">div</span>&gt;</span></span><br></pre></td></tr></table></figure>
</blockquote>
</li>
</ul>
<h4 id="8-2-阅读时长统计"><a href="#8-2-阅读时长统计" class="headerlink" title="8.2 阅读时长统计"></a>8.2 阅读时长统计</h4><blockquote>
<p>步骤与7.1相同</p>
</blockquote>
<ul>
<li>安装插件 hexo-wordcount</li>
<li>博客根目录<code>_config.yml</code>添加配置</li>
<li>修改<code>themes\yilia\layout\_partial\article.ejs</code></li>
<li>最后在<code>themes\yilia\layout\_partial\post</code>目录下新建<code>word.ejs</code></li>
</ul>
<hr>
<h3 id="9-背景音乐功能"><a href="#9-背景音乐功能" class="headerlink" title="9. 背景音乐功能"></a>9. 背景音乐功能</h3><blockquote>
<p>使用网易云音乐</p>
</blockquote>
<h4 id="9-1-文章内音乐"><a href="#9-1-文章内音乐" class="headerlink" title="9.1 文章内音乐"></a>9.1 文章内音乐</h4><ul>
<li><p>从网易云音乐获取音乐外链</p>
<blockquote>
<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">iframe</span> <span class="attr">frameborder</span>=<span class="string">"no"</span> <span class="attr">border</span>=<span class="string">"0"</span> <span class="attr">marginwidth</span>=<span class="string">"0"</span> <span class="attr">marginheight</span>=<span class="string">"0"</span> <span class="attr">width</span>=<span class="string">330</span> <span class="attr">height</span>=<span class="string">86</span> <span class="attr">src</span>=<span class="string">"//music.163.com/outchain/player?type=2&amp;id=468490592&amp;auto=0&amp;height=66"</span>&gt;</span><span class="tag">&lt;/<span class="name">iframe</span>&gt;</span></span><br></pre></td></tr></table></figure>
</blockquote>
</li>
<li><p>将外链输入到文章中即可</p>
<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">iframe</span> <span class="attr">frameborder</span>=<span class="string">"no"</span> <span class="attr">border</span>=<span class="string">"0"</span> <span class="attr">marginwidth</span>=<span class="string">"0"</span> <span class="attr">marginheight</span>=<span class="string">"0"</span> <span class="attr">width</span>=<span class="string">330</span> <span class="attr">height</span>=<span class="string">110</span> <span class="attr">src</span>=<span class="string">"//music.163.com/outchain/player?type=4&amp;id=1217042&amp;auto=0&amp;height=90"</span>&gt;</span><span class="tag">&lt;/<span class="name">iframe</span>&gt;</span></span><br></pre></td></tr></table></figure>

</li>
</ul>
<h4 id="9-2-主页背景音乐"><a href="#9-2-主页背景音乐" class="headerlink" title="9.2 主页背景音乐"></a>9.2 主页背景音乐</h4><ul>
<li><p>获取外链</p>
<blockquote>
<p>注意：要获取多个音乐的外链可以将其添加到歌单、电台中，获取外链</p>
<p>auto 表示是否自动播放</p>
<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">iframe</span> <span class="attr">frameborder</span>=<span class="string">"no"</span> <span class="attr">border</span>=<span class="string">"0"</span> <span class="attr">marginwidth</span>=<span class="string">"0"</span> <span class="attr">marginheight</span>=<span class="string">"0"</span> <span class="attr">width</span>=<span class="string">330</span> <span class="attr">height</span>=<span class="string">86</span> <span class="attr">src</span>=<span class="string">"//music.163.com/outchain/player?type=2&amp;id=4993317&amp;auto=1&amp;height=66"</span>&gt;</span><span class="tag">&lt;/<span class="name">iframe</span>&gt;</span></span><br></pre></td></tr></table></figure>
</blockquote>
</li>
<li><p>引入播放器代码</p>
<p>  在<code>themes/yilia/layout/_partial/left-col.ejs</code>文件<code>nav</code>标签中添加代码</p>
<blockquote>
<p> 注：放在<code>&lt;nav&gt;</code>和<code>&lt;/nav&gt;</code>之内</p>
<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment">&lt;!-- 网易云音乐插件 --&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">%</span> <span class="attr">if</span> (<span class="attr">theme.music</span> &amp;&amp; <span class="attr">theme.music.enable</span>)&#123; %&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">div</span> <span class="attr">style</span>=<span class="string">"position:absolute; bottom:120px left:auto; width:85%"</span>&gt;</span></span><br><span class="line">       <span class="tag">&lt;<span class="name">iframe</span> <span class="attr">frameborder</span>=<span class="string">"no"</span> <span class="attr">border</span>=<span class="string">"0"</span> <span class="attr">marginwidth</span>=<span class="string">"0"</span> <span class="attr">marginheight</span>=<span class="string">"0"</span> <span class="attr">width</span>=<span class="string">228</span> <span class="attr">height</span>=<span class="string">52</span> <span class="attr">src</span>=<span class="string">"//music.163.com/outchain/player?type=4&amp;id=349623778&amp;auto=0&amp;height=32"</span>&gt;</span><span class="tag">&lt;/<span class="name">iframe</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;/<span class="name">div</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">%</span> &#125; %&gt;</span></span><br></pre></td></tr></table></figure>

<p> 通过设置marginheight=”0” width=330 height=110 来改变大小，美化界面</p>
</blockquote>
</li>
<li><p>在yilia主题配置文件<code>_config.yml</code>中添加属性</p>
<blockquote>
<figure class="highlight yml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># 网易云音乐插件</span></span><br><span class="line"><span class="attr">music:</span></span><br><span class="line">  <span class="attr">enable:</span> <span class="literal">true</span></span><br><span class="line">  <span class="comment">#id: 1332647902  # 网易云分享的ID</span></span><br><span class="line">  <span class="attr">autoplay:</span> <span class="literal">false</span>  <span class="comment"># 是否开启自动播放</span></span><br></pre></td></tr></table></figure>
</blockquote>
</li>
</ul>
<h4 id="9-3-遗留问题-未解决"><a href="#9-3-遗留问题-未解决" class="headerlink" title="9.3 遗留问题(未解决)"></a>9.3 遗留问题(未解决)</h4><ul>
<li><p><strong>歌单外链错误 : music.163.com上的嵌入式页面显示资源加载失败</strong></p>
<blockquote>
<p>单首音乐对象直接生成外链、电台对象生成外链均不会出现资源加载失败问题；</p>
<p>但是，使用歌单对象(即使歌单只有一首音乐)，会出现资源加载失败错问题；</p>
<p>推测可能是歌单后台有bug，已反馈给网易云客服。</p>
</blockquote>
</li>
<li><p><a href="https://blog.csdn.net/hubaoquanu/article/details/79084193" target="_blank" rel="noopener">解决办法</a></p>
<ul>
<li><p>原因：是由于开启了IPv6后使用了google的IPv6 DNS，音乐资源网站ip解析会直接错误解析到本地127.0.0.1</p>
</li>
<li><p>方法(均无效)：</p>
<ul>
<li><p>添加以下内容到hosts文件C:\Windows\System32\drivers\etc\hosts</p>
<blockquote>
<figure class="highlight"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># 解决ipv6开启后网易云音乐无法播放的问题</span></span><br><span class="line">111.19.136.246 m10.music.126.net</span><br><span class="line">111.20.255.169 p1.music.126.net</span><br><span class="line">223.252.199.66 music.163.com</span><br></pre></td></tr></table></figure>
</blockquote>
<p>直接停用IPv6功能，在网络和共享中心—网络状态—属性里面，不勾选TCP/IPv6。</p>
</li>
<li><p>使用国内的IPv6DNS: 240c::6666，此时无法访问Google和Youtube。</p>
</li>
</ul>
</li>
</ul>
</li>
</ul>
<hr>
<h3 id="10-文章加密功能"><a href="#10-文章加密功能" class="headerlink" title="10. 文章加密功能"></a>10. 文章加密功能</h3><blockquote>
<p>文章加密一般有两种方式：</p>
<p>1.Nginx授权访问；</p>
<p>2.Hexo-Blog-Encrypt；</p>
<p>由于Nginx授权访问的前置条件是：Hexo博客搭在Nginx服务器；这里用Encrypt插件实现加密</p>
</blockquote>
<h4 id="10-1-引入加密插件"><a href="#10-1-引入加密插件" class="headerlink" title="10.1 引入加密插件"></a>10.1 引入加密插件</h4><ul>
<li><p>安装加密插件Encrypt</p>
<blockquote>
<p>找到博客根目录下的<code>package.json</code>,最下面添加</p>
<figure class="highlight"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">"hexo-blog-encrypt": "2.0.*"</span><br></pre></td></tr></table></figure>

<p>注意：添加时要记得给前一项加上  <strong>,</strong></p>
</blockquote>
</li>
<li><p>进入博客根目录，Git bash，安装</p>
<blockquote>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">npm install</span><br><span class="line"><span class="comment"># 或者</span></span><br><span class="line">cnpm</span><br></pre></td></tr></table></figure>
</blockquote>
</li>
</ul>
<h4 id="10-2-修改配置"><a href="#10-2-修改配置" class="headerlink" title="10.2 修改配置"></a>10.2 修改配置</h4><ul>
<li><p>找到根目录下的<code>_config.yml</code>文件，添加</p>
<blockquote>
<figure class="highlight yml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># Security</span></span><br><span class="line"><span class="comment">#</span></span><br><span class="line"><span class="attr">encrypt:</span></span><br><span class="line">    <span class="attr">enable:</span> <span class="literal">true</span></span><br></pre></td></tr></table></figure>
</blockquote>
</li>
</ul>
<h4 id="10-3-修改MD文章开头属性"><a href="#10-3-修改MD文章开头属性" class="headerlink" title="10.3 修改MD文章开头属性"></a>10.3 修改MD文章开头属性</h4><ul>
<li><p>在需要加密的文章.md文件开头写入</p>
<blockquote>
<p>password: 这里填密码<br>abstract: 这里是博客简述(可见)<br>message: 输入密码提示语句</p>
<figure class="highlight yml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br></pre></td><td class="code"><pre><span class="line"><span class="meta">---</span></span><br><span class="line"><span class="attr">title:</span> <span class="string">加密文章</span></span><br><span class="line"><span class="attr">date:</span> <span class="number">2019</span><span class="number">-05</span><span class="number">-30</span> <span class="number">22</span><span class="string">:02:07</span></span><br><span class="line"><span class="attr">password:</span> <span class="string">这里填密码</span></span><br><span class="line"><span class="attr">abstract:</span> <span class="string">这里是博客简述（能被访客看见）</span></span><br><span class="line"><span class="attr">message:</span> <span class="string">输入密码提示语句（例如：请输入密码）</span></span><br><span class="line"><span class="meta">---</span></span><br></pre></td></tr></table></figure>
</blockquote>
</li>
</ul>
<hr>
<h3 id="11-版权信息功能"><a href="#11-版权信息功能" class="headerlink" title="11. 版权信息功能"></a>11. 版权信息功能</h3><blockquote>
<p>这里介绍两种添加版权信息的方式，其实两者区别不大，一种直接在articles.ejs里面添加版权信息，另一种是把版权信息单独卸载一个ejs文件declare.ejs内。</p>
</blockquote>
<h4 id="11-1-直接修改版"><a href="#11-1-直接修改版" class="headerlink" title="11.1 直接修改版"></a>11.1 直接修改版</h4><blockquote>
<p>参考：<a href="http://dongshuyan.com/2019/05/24/hexo%E5%8D%9A%E5%AE%A2%E6%B3%A8%E6%84%8F%E4%BA%8B%E9%A1%B9/#4-%E6%80%8E%E4%B9%88%E7%BD%AE%E9%A1%B6%E6%96%87%E7%AB%A0" target="_blank" rel="noopener">添加版权信息</a></p>
</blockquote>
<ul>
<li><p>修改文件<code>themes/yilia/layout/_partial/article.ejs</code></p>
<blockquote>
<p>代码添加的位置——此处第11行</p>
<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br></pre></td><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">div</span> <span class="attr">class</span>=<span class="string">"article-entry"</span> <span class="attr">itemprop</span>=<span class="string">"articleBody"</span>&gt;</span></span><br><span class="line">  <span class="tag">&lt;<span class="name">%</span> <span class="attr">if</span> (<span class="attr">post.excerpt</span> &amp;&amp; <span class="attr">index</span>)&#123; %&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">%-</span> <span class="attr">post.excerpt</span> %&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">%</span> <span class="attr">if</span> (<span class="attr">theme.excerpt_link</span>) &#123; %&gt;</span></span><br><span class="line">      <span class="tag">&lt;<span class="name">a</span> <span class="attr">class</span>=<span class="string">"article-more-a"</span> <span class="attr">href</span>=<span class="string">"&lt;%- url_for(post.path) %&gt;#more"</span>&gt;</span><span class="tag">&lt;<span class="name">%=</span> <span class="attr">theme.excerpt_link</span> %&gt;</span> &gt;&gt;<span class="tag">&lt;/<span class="name">a</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">%</span> &#125; %&gt;</span></span><br><span class="line">  <span class="tag">&lt;<span class="name">%</span> &#125; <span class="attr">else</span> &#123; %&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">%-</span> <span class="attr">post.content</span> %&gt;</span></span><br><span class="line">  <span class="tag">&lt;<span class="name">%</span> &#125; %&gt;</span></span><br><span class="line">   </span><br><span class="line">  <span class="tag">&lt;<span class="name">--</span> 在此处添加代码<span class="attr">--</span>&gt;</span></span><br><span class="line">      </span><br><span class="line">  <span class="tag">&lt;<span class="name">%</span> <span class="attr">if</span> ((<span class="attr">theme.reward_type</span> === <span class="string">2</span> || (<span class="attr">theme.reward_type</span> === <span class="string">1</span> &amp;&amp; <span class="attr">post.reward</span>)) &amp;&amp; !<span class="attr">index</span>)&#123; %&gt;</span></span><br><span class="line">  <span class="tag">&lt;<span class="name">div</span> <span class="attr">class</span>=<span class="string">"page-reward"</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">a</span> <span class="attr">href</span>=<span class="string">"javascript:;"</span> <span class="attr">class</span>=<span class="string">"page-reward-btn tooltip-top"</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">div</span> <span class="attr">class</span>=<span class="string">"tooltip tooltip-east"</span>&gt;</span></span><br></pre></td></tr></table></figure>

<p>添加</p>
<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment">&lt;!-- 《添加版权声明 --&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">%</span></span></span><br><span class="line"><span class="tag">  <span class="attr">var</span> <span class="attr">sUrl</span> = <span class="string">url.replace(/index\.html$/,</span> '');</span></span><br><span class="line"><span class="tag">  <span class="attr">sUrl</span> = <span class="string">/^(http:|https:)\/\//.test(sUrl)</span> ? <span class="attr">sUrl</span> <span class="attr">:</span> '<span class="attr">https:</span>' + <span class="attr">sUrl</span>;</span></span><br><span class="line"><span class="tag">%&gt;</span></span><br><span class="line"></span><br><span class="line"><span class="comment">&lt;!-- #版权基础设定：0-关闭声明； 1-文章对应的md文件里有declare: true属性，才有版权声明； 2-所有文章均有版权声明 --&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">%</span> <span class="attr">if</span> ((<span class="attr">theme.declare.declare_type</span> === <span class="string">2</span> || (<span class="attr">theme.declare.declare_type</span> === <span class="string">1</span> &amp;&amp; <span class="attr">post.declare</span>)) &amp;&amp; !<span class="attr">index</span>)&#123; %&gt;</span></span><br><span class="line">  <span class="tag">&lt;<span class="name">div</span> <span class="attr">class</span>=<span class="string">"declare"</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">strong</span> <span class="attr">class</span>=<span class="string">"author"</span>&gt;</span>本文作者：<span class="tag">&lt;/<span class="name">strong</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">%</span> <span class="attr">if</span>(<span class="attr">config.author</span> != <span class="string">undefined)&#123;</span> %&gt;</span></span><br><span class="line">      <span class="tag">&lt;<span class="name">%=</span> <span class="attr">config.author</span>%&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">%</span> &#125;<span class="attr">else</span>&#123;%&gt;</span></span><br><span class="line">      <span class="tag">&lt;<span class="name">font</span> <span class="attr">color</span>=<span class="string">"red"</span>&gt;</span>请在博客根目录“_config.yml”中填入正确的“author”<span class="tag">&lt;/<span class="name">font</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">%&#125;%</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">br</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">strong</span> <span class="attr">class</span>=<span class="string">"create-time"</span>&gt;</span>发布时间：<span class="tag">&lt;/<span class="name">strong</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">%-</span> <span class="attr">date</span>(<span class="attr">post.date</span>, '<span class="attr">YYYY-MM-DD</span> <span class="attr">HH:mm:ss</span>') %&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">br</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">strong</span> <span class="attr">class</span>=<span class="string">"update-time"</span>&gt;</span>最后更新：<span class="tag">&lt;/<span class="name">strong</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">%-</span> <span class="attr">date</span>(<span class="attr">post.updated</span>, '<span class="attr">YYYY-MM-DD</span> <span class="attr">HH:mm:ss</span>') %&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">br</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">strong</span> <span class="attr">class</span>=<span class="string">"article-titles"</span>&gt;</span>本文标题：<span class="tag">&lt;/<span class="name">strong</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">a</span> <span class="attr">href</span>=<span class="string">"&lt;%= config.url%&gt;/&lt;%= post.path %&gt;"</span> <span class="attr">title</span>=<span class="string">"&lt;%= post.title %&gt;"</span> <span class="attr">target</span>=<span class="string">"_blank"</span>&gt;</span><span class="tag">&lt;<span class="name">%=</span> <span class="attr">post.title</span> %&gt;</span><span class="tag">&lt;/<span class="name">a</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">br</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">strong</span> <span class="attr">class</span>=<span class="string">"article-url"</span>&gt;</span>本文链接：<span class="tag">&lt;/<span class="name">strong</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">a</span> <span class="attr">href</span>=<span class="string">"&lt;%=config.url%&gt;/&lt;%= post.path  %&gt;"</span> <span class="attr">title</span>=<span class="string">"&lt;%= post.title %&gt;"</span> <span class="attr">target</span>=<span class="string">"_blank"</span>&gt;</span><span class="tag">&lt;<span class="name">%=</span> <span class="attr">config.url</span>%&gt;</span>/<span class="tag">&lt;<span class="name">%=</span> <span class="attr">page.path</span> %&gt;</span><span class="tag">&lt;/<span class="name">a</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">br</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">strong</span> <span class="attr">class</span>=<span class="string">"copyright"</span>&gt;</span>版权声明：<span class="tag">&lt;/<span class="name">strong</span>&gt;</span></span><br><span class="line">    本作品采用</span><br><span class="line">    <span class="tag">&lt;<span class="name">a</span> <span class="attr">rel</span>=<span class="string">"license"</span> <span class="attr">href</span>=<span class="string">"&lt;%= theme.declare.licensee_url%&gt;"</span> <span class="attr">title</span>=<span class="string">"&lt;%= theme.declare.licensee_alias %&gt;"</span>&gt;</span><span class="tag">&lt;<span class="name">%=</span> <span class="attr">theme.declare.licensee_name</span>%&gt;</span><span class="tag">&lt;/<span class="name">a</span>&gt;</span></span><br><span class="line">    许可协议进行许可。转载请注明作者和出处！</span><br><span class="line">    <span class="tag">&lt;<span class="name">%</span> <span class="attr">if</span>(<span class="attr">theme.declare.licensee_img</span> != <span class="string">undefined)&#123;</span> %&gt;</span></span><br><span class="line">      <span class="tag">&lt;<span class="name">br</span>&gt;</span></span><br><span class="line">      <span class="tag">&lt;<span class="name">a</span> <span class="attr">rel</span>=<span class="string">"license"</span> <span class="attr">href</span>=<span class="string">"&lt;%= theme.declare.licensee_url%&gt;"</span>&gt;</span><span class="tag">&lt;<span class="name">img</span> <span class="attr">alt</span>=<span class="string">"知识共享许可协议"</span> <span class="attr">style</span>=<span class="string">"border-width:0"</span> <span class="attr">src</span>=<span class="string">"&lt;%= theme.declare.licensee_img%&gt;"</span>/&gt;</span><span class="tag">&lt;/<span class="name">a</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">%</span> &#125; %&gt;</span></span><br><span class="line">  <span class="tag">&lt;/<span class="name">div</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">%</span> &#125; <span class="attr">else</span> &#123;%&gt;</span></span><br><span class="line">  <span class="tag">&lt;<span class="name">div</span> <span class="attr">class</span>=<span class="string">"declare"</span> <span class="attr">hidden</span>=<span class="string">"hidden"</span>&gt;</span><span class="tag">&lt;/<span class="name">div</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">%</span> &#125; %&gt;</span></span><br><span class="line"><span class="comment">&lt;!-- 添加版权声明》 --&gt;</span></span><br></pre></td></tr></table></figure>
</blockquote>
</li>
<li><p>创建新文件<code>declare.scss</code></p>
<blockquote>
<p>路径：<code>themes/yilia/source-src/css/declare.scss</code></p>
<p>添加css</p>
<figure class="highlight css"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br></pre></td><td class="code"><pre><span class="line"><span class="selector-class">.declare</span> &#123;</span><br><span class="line">    <span class="attribute">background-color</span>: <span class="number">#eaeaea</span>;</span><br><span class="line">    <span class="attribute">margin-top</span>: <span class="number">2em</span>;</span><br><span class="line">    <span class="attribute">border-left</span>: <span class="number">3px</span> solid <span class="number">#ff1700</span>;</span><br><span class="line">    <span class="attribute">padding</span>: .<span class="number">5em</span> <span class="number">1em</span>;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
</blockquote>
</li>
<li><p>修改文件<code>themes/yilia/source-src/css/main.scss</code></p>
<blockquote>
<figure class="highlight css"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">@import</span> <span class="string">"./declare"</span>;</span><br></pre></td></tr></table></figure>
</blockquote>
</li>
<li><p>修改主题配置文件<code>themes/yilia/_config.yml</code></p>
<blockquote>
<figure class="highlight yml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># 版权声明</span></span><br><span class="line"><span class="comment">#在需要进行版权声明的文章的md文件头部，设置属性declare: true。</span></span><br><span class="line"><span class="comment">#版权基础设定：0-关闭声明； 1-文章对应的md文件里有declare: true属性，才有版权声明； 2-所有文章均有版权声明</span></span><br><span class="line"><span class="attr">declare:</span></span><br><span class="line">  <span class="attr">declare_type:</span> <span class="number">1</span></span><br><span class="line">  <span class="attr">licensee_url:</span> <span class="string">https://creativecommons.org/licenses/by-nc-sa/4.0/</span>        <span class="comment">#当前应用的版权协议地址。</span></span><br><span class="line">  <span class="attr">licensee_name:</span> <span class="string">'CC BY-NC-SA 4.0'</span>                                        <span class="comment">#版权协议的名称</span></span><br><span class="line">  <span class="attr">licensee_alias:</span> <span class="string">'知识共享署名-非商业性使用-相同方式共享 4.0 国际许可协议'</span>       <span class="comment"># alias别名</span></span><br><span class="line">  <span class="attr">licensee_img:</span> <span class="string">https://i.creativecommons.org/l/by-nc-sa/4.0/88x31.png</span>    <span class="comment">#版权协议的Logo</span></span><br></pre></td></tr></table></figure>
</blockquote>
</li>
<li><p>然后在需要进行版权声明的文章的md文件头部，设置属性declare</p>
<blockquote>
<figure class="highlight yml"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><span class="string">declare:true</span></span><br></pre></td></tr></table></figure>
</blockquote>
</li>
</ul>
<h4 id="11-2-新建文件版"><a href="#11-2-新建文件版" class="headerlink" title="11.2 新建文件版"></a>11.2 新建文件版</h4><blockquote>
<p>参考：<a href="https://blog.csdn.net/qq_40922859/article/details/97035497?utm_medium=distribute.pc_relevant.none-task-blog-BlogCommendFromMachineLearnPai2-2.channel_param&depth_1-utm_source=distribute.pc_relevant.none-task-blog-BlogCommendFromMachineLearnPai2-2.channel_param" target="_blank" rel="noopener">添加版权信息</a></p>
</blockquote>
<ul>
<li><p>新建文件<code>declare.ejs</code></p>
<blockquote>
<p>路径：<code>\themes\yilia\layout\_partial\post\</code></p>
<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment">&lt;!-- 《添加版权声明 --&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">%</span></span></span><br><span class="line"><span class="tag">  <span class="attr">var</span> <span class="attr">sUrl</span> = <span class="string">url.replace(/index\.html$/,</span> '');</span></span><br><span class="line"><span class="tag">  <span class="attr">sUrl</span> = <span class="string">/^(http:|https:)\/\//.test(sUrl)</span> ? <span class="attr">sUrl</span> <span class="attr">:</span> '<span class="attr">https:</span>' + <span class="attr">sUrl</span>;</span></span><br><span class="line"><span class="tag">%&gt;</span></span><br><span class="line"></span><br><span class="line"><span class="comment">&lt;!-- #版权基础设定：0-关闭声明； 1-文章对应的md文件里有declare: true属性，才有版权声明； 2-所有文章均有版权声明 --&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">%</span> <span class="attr">if</span> ((<span class="attr">theme.declare.declare_type</span> === <span class="string">2</span> || (<span class="attr">theme.declare.declare_type</span> === <span class="string">1</span> &amp;&amp; <span class="attr">post.declare</span>)) &amp;&amp; !<span class="attr">index</span>)&#123; %&gt;</span></span><br><span class="line">  <span class="tag">&lt;<span class="name">div</span> <span class="attr">class</span>=<span class="string">"declare"</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">strong</span> <span class="attr">class</span>=<span class="string">"author"</span>&gt;</span>本文作者：<span class="tag">&lt;/<span class="name">strong</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">%</span> <span class="attr">if</span>(<span class="attr">config.author</span> != <span class="string">undefined)&#123;</span> %&gt;</span></span><br><span class="line">      <span class="tag">&lt;<span class="name">%=</span> <span class="attr">config.author</span>%&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">%</span> &#125;<span class="attr">else</span>&#123;%&gt;</span></span><br><span class="line">      <span class="tag">&lt;<span class="name">font</span> <span class="attr">color</span>=<span class="string">"red"</span>&gt;</span>请在博客根目录“_config.yml”中填入正确的“author”<span class="tag">&lt;/<span class="name">font</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">%&#125;%</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">br</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">strong</span> <span class="attr">class</span>=<span class="string">"create-time"</span>&gt;</span>发布时间：<span class="tag">&lt;/<span class="name">strong</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">%-</span> <span class="attr">date</span>(<span class="attr">post.date</span>, '<span class="attr">YYYY-MM-DD</span> <span class="attr">HH:mm:ss</span>') %&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">br</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">strong</span> <span class="attr">class</span>=<span class="string">"update-time"</span>&gt;</span>最后更新：<span class="tag">&lt;/<span class="name">strong</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">%-</span> <span class="attr">date</span>(<span class="attr">post.updated</span>, '<span class="attr">YYYY-MM-DD</span> <span class="attr">HH:mm:ss</span>') %&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">br</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">strong</span> <span class="attr">class</span>=<span class="string">"article-titles"</span>&gt;</span>本文标题：<span class="tag">&lt;/<span class="name">strong</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">a</span> <span class="attr">href</span>=<span class="string">"&lt;%= config.url%&gt;/&lt;%= post.path %&gt;"</span> <span class="attr">title</span>=<span class="string">"&lt;%= post.title %&gt;"</span> <span class="attr">target</span>=<span class="string">"_blank"</span>&gt;</span><span class="tag">&lt;<span class="name">%=</span> <span class="attr">post.title</span> %&gt;</span><span class="tag">&lt;/<span class="name">a</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">br</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">strong</span> <span class="attr">class</span>=<span class="string">"article-url"</span>&gt;</span>本文链接：<span class="tag">&lt;/<span class="name">strong</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">a</span> <span class="attr">href</span>=<span class="string">"&lt;%= config.url%&gt;/&lt;%= post.path  %&gt;"</span> <span class="attr">title</span>=<span class="string">"&lt;%= post.title %&gt;"</span> <span class="attr">target</span>=<span class="string">"_blank"</span>&gt;</span><span class="tag">&lt;<span class="name">%=</span> <span class="attr">config.url</span>%&gt;</span>/<span class="tag">&lt;<span class="name">%=</span> <span class="attr">page.path</span> %&gt;</span><span class="tag">&lt;/<span class="name">a</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">br</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">strong</span> <span class="attr">class</span>=<span class="string">"copyright"</span>&gt;</span>版权声明：<span class="tag">&lt;/<span class="name">strong</span>&gt;</span></span><br><span class="line">    本作品采用</span><br><span class="line">    <span class="tag">&lt;<span class="name">a</span> <span class="attr">rel</span>=<span class="string">"license"</span> <span class="attr">href</span>=<span class="string">"&lt;%= theme.declare.licensee_url%&gt;"</span> <span class="attr">title</span>=<span class="string">"&lt;%= theme.declare.licensee_alias %&gt;"</span>&gt;</span><span class="tag">&lt;<span class="name">%=</span> <span class="attr">theme.declare.licensee_name</span>%&gt;</span><span class="tag">&lt;/<span class="name">a</span>&gt;</span></span><br><span class="line">    许可协议进行许可。转载请注明作者和出处！</span><br><span class="line">    <span class="tag">&lt;<span class="name">%</span> <span class="attr">if</span>(<span class="attr">theme.declare.licensee_img</span> != <span class="string">undefined)&#123;</span> %&gt;</span></span><br><span class="line">      <span class="tag">&lt;<span class="name">br</span>&gt;</span></span><br><span class="line">     <span class="comment">&lt;!--版权logo如果加载不出来可以注释掉--&gt;</span></span><br><span class="line">      <span class="tag">&lt;<span class="name">a</span> <span class="attr">rel</span>=<span class="string">"license"</span> <span class="attr">href</span>=<span class="string">"&lt;%= theme.declare.licensee_url%&gt;"</span>&gt;</span><span class="tag">&lt;<span class="name">img</span> <span class="attr">alt</span>=<span class="string">"知识共享许可协议"</span> <span class="attr">style</span>=<span class="string">"border-width:0"</span> <span class="attr">src</span>=<span class="string">"&lt;%= theme.declare.licensee_img%&gt;"</span>/&gt;</span><span class="tag">&lt;/<span class="name">a</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">%</span> &#125; %&gt;</span></span><br><span class="line">  <span class="tag">&lt;/<span class="name">div</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">%</span> &#125; <span class="attr">else</span> &#123;%&gt;</span></span><br><span class="line">  <span class="tag">&lt;<span class="name">div</span> <span class="attr">class</span>=<span class="string">"declare"</span> <span class="attr">hidden</span>=<span class="string">"hidden"</span>&gt;</span><span class="tag">&lt;/<span class="name">div</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">%</span> &#125; %&gt;</span></span><br><span class="line"><span class="comment">&lt;!-- 添加版权声明》 --&gt;</span>     </span><br></pre></td></tr></table></figure>
</blockquote>
</li>
<li><p>修改文件<code>themes\yilia\layout\_partial\article.ejs</code></p>
<blockquote>
<p>添加</p>
<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment">&lt;!-- 《添加版权声明 --&gt;</span></span><br><span class="line">        <span class="tag">&lt;<span class="name">%</span> <span class="attr">if</span>(<span class="attr">theme.declare</span>)&#123;%&gt;</span></span><br><span class="line">            <span class="tag">&lt;<span class="name">%-</span> <span class="attr">partial</span>('<span class="attr">post</span>/<span class="attr">declare</span>') %&gt;</span></span><br><span class="line">        <span class="tag">&lt;<span class="name">%</span> &#125; %&gt;</span></span><br><span class="line"><span class="comment">&lt;!-- 添加版权声明》 --&gt;</span></span><br></pre></td></tr></table></figure>
</blockquote>
</li>
<li><p>修改文件<code>\themes\yilia\source\main.xxxxx.css</code></p>
<blockquote>
<p>在底部添加</p>
<figure class="highlight css"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment">/* 版权声明 */</span></span><br><span class="line"><span class="selector-class">.declare</span> &#123;</span><br><span class="line">	<span class="attribute">background-color</span>: <span class="number">#eaeaea</span>;</span><br><span class="line">	<span class="attribute">margin-top</span>: <span class="number">2em</span>;</span><br><span class="line">	<span class="attribute">border-left</span>: <span class="number">3px</span> solid <span class="number">#ff1700</span>;</span><br><span class="line">	<span class="attribute">padding</span>: .<span class="number">5em</span> <span class="number">1em</span>;</span><br><span class="line">&#125;</span><br><span class="line"><span class="selector-tag">ul</span><span class="selector-class">.declare</span> <span class="selector-tag">li</span> &#123;</span><br><span class="line">    <span class="attribute">font-size</span>: <span class="number">19px</span>;</span><br><span class="line">    <span class="attribute">font-weight</span>: bold;</span><br><span class="line">    <span class="attribute">line-height</span>: <span class="number">1.5</span>;</span><br><span class="line">&#125;</span><br><span class="line"><span class="comment">/* 版权声明移动端 */</span></span><br><span class="line"><span class="keyword">@media</span> screen <span class="keyword">and</span> (<span class="attribute">max-width:</span><span class="number">800px</span>)&#123;</span><br><span class="line">	<span class="selector-tag">li</span><span class="selector-class">.declare_article-url</span>&#123;</span><br><span class="line">		<span class="attribute">display</span>: none;</span><br><span class="line">	&#125;</span><br><span class="line">  <span class="selector-tag">ul</span><span class="selector-class">.declare</span> <span class="selector-tag">li</span>&#123;</span><br><span class="line">		<span class="attribute">font-weight</span>: normal;</span><br><span class="line">		<span class="attribute">font-size</span>: <span class="number">16px</span>;</span><br><span class="line">	&#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
</blockquote>
</li>
<li><p>修改主题配置文件<code>\themes\yilia\_config.yml</code>:</p>
<blockquote>
<p>添加</p>
<figure class="highlight yml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># 版权声明</span></span><br><span class="line"><span class="comment">#在需要进行版权声明的文章的md文件头部，设置属性declare: true。</span></span><br><span class="line"><span class="comment">#版权基础设定：0-关闭声明； 1-文章对应的md文件里有declare: true属性，才有版权声明； 2-所有文章均有版权声明</span></span><br><span class="line"><span class="attr">declare:</span></span><br><span class="line">  <span class="attr">declare_type:</span> <span class="number">1</span></span><br><span class="line">  <span class="attr">licensee_url:</span> <span class="string">https://creativecommons.org/licenses/by-nc-sa/4.0/</span>        <span class="comment">#当前应用的版权协议地址。</span></span><br><span class="line">  <span class="attr">licensee_name:</span> <span class="string">'CC BY-NC-SA 4.0'</span>                                        <span class="comment">#版权协议的名称</span></span><br><span class="line">  <span class="attr">licensee_alias:</span> <span class="string">'知识共享署名-非商业性使用-相同方式共享 4.0 国际许可协议'</span>       <span class="comment"># alias别名</span></span><br><span class="line">  <span class="attr">licensee_img:</span> <span class="string">https://i.creativecommons.org/l/by-nc-sa/4.0/88x31.png</span>    <span class="comment">#版权协议的Logo</span></span><br></pre></td></tr></table></figure>
</blockquote>
</li>
<li><p>在需要进行版权声明的文章的md文件头部，设置属性copyright</p>
<blockquote>
<figure class="highlight yml"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><span class="attr">declare:</span> <span class="literal">true</span></span><br></pre></td></tr></table></figure>
</blockquote>
</li>
<li><p>注意：</p>
<ul>
<li><p>第二种方法中，没有新建declare.sccs文件，而是直接将版权信息的显示格式设置放在了<code>\themes\yilia\source\main.xxxxx.css</code>中；</p>
</li>
<li><p>版权协议的Logo所在网址需要人机验证，所以获取不到Logo时可以手动登录<a href="https://i.creativecommons.org/l/by-nc-sa/4.0/88x31.png" target="_blank" rel="noopener">协议Logo</a>进行验证，从而使得Logo可以被获取；</p>
</li>
<li><p>一些属性定义</p>
<ul>
<li><code>page</code>和<code>post</code>基本一致</li>
</ul>
<ul>
<li><strong>theme.author</strong> ： 作者名</li>
<li><strong>post.title</strong> ：文章标题</li>
<li><strong>post.path</strong>　：文章相对路径</li>
<li><strong>post.permalink</strong> : 文章绝对路径</li>
<li><strong>post.date</strong> : 日期</li>
</ul>
</li>
</ul>
</li>
</ul>
<hr>
<h3 id="12-爱心、光玉特效功能"><a href="#12-爱心、光玉特效功能" class="headerlink" title="12. 爱心、光玉特效功能"></a>12. 爱心、光玉特效功能</h3><ul>
<li><a href="https://yansheng836.github.io/article/cf9c6a5e.html#%E5%8A%A8%E6%80%81%E7%BA%BF%E6%9D%A1%E8%83%8C%E6%99%AF" target="_blank" rel="noopener">特效大全</a></li>
<li>爱心、雪花、动态线条、文字、彩带等特效</li>
</ul>
<h4 id="12-1-点击爱心"><a href="#12-1-点击爱心" class="headerlink" title="12.1 点击爱心"></a>12.1 点击爱心</h4><ul>
<li><p>新建js文件：\yilia\source\路径下新建<code>clicklove.js</code>,内容如下</p>
<blockquote>
<p><code>clicklove.js</code></p>
<figure class="highlight js"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br><span class="line">44</span><br><span class="line">45</span><br></pre></td><td class="code"><pre><span class="line">! <span class="function"><span class="keyword">function</span> (<span class="params">e, t, a</span>) </span>&#123;</span><br><span class="line">    <span class="function"><span class="keyword">function</span> <span class="title">n</span>(<span class="params"></span>) </span>&#123;</span><br><span class="line">        c(<span class="string">".heart&#123;width: 10px;height: 10px;position: fixed;background: #f00;transform: rotate(45deg);-webkit-transform: rotate(45deg);-moz-transform: rotate(45deg);&#125;.heart:after,.heart:before&#123;content: '';width: inherit;height: inherit;background: inherit;border-radius: 50%;-webkit-border-radius: 50%;-moz-border-radius: 50%;position: fixed;&#125;.heart:after&#123;top: -5px;&#125;.heart:before&#123;left: -5px;&#125;"</span>), o(), r()</span><br><span class="line">    &#125;</span><br><span class="line">    <span class="function"><span class="keyword">function</span> <span class="title">r</span>(<span class="params"></span>) </span>&#123;</span><br><span class="line">        <span class="keyword">for</span> (<span class="keyword">var</span> e = <span class="number">0</span>; e &lt; d.length; e++) d[e].alpha &lt;= <span class="number">0</span> ? (t.body.removeChild(d[e].el), d.splice(e, <span class="number">1</span>)) : (d[e].y--, d[e].scale += <span class="number">.004</span>, d[e].alpha -= <span class="number">.013</span>, d[e].el.style.cssText = <span class="string">"left:"</span> + d[e].x + <span class="string">"px;top:"</span> + d[e].y + <span class="string">"px;opacity:"</span> + d[e].alpha + <span class="string">";transform:scale("</span> + d[e].scale + <span class="string">","</span> + d[e].scale + <span class="string">") rotate(45deg);background:"</span> + d[e].color + <span class="string">";z-index:99999"</span>);</span><br><span class="line">        requestAnimationFrame(r)</span><br><span class="line">    &#125;</span><br><span class="line">    <span class="function"><span class="keyword">function</span> <span class="title">o</span>(<span class="params"></span>) </span>&#123;</span><br><span class="line">        <span class="keyword">var</span> t = <span class="string">"function"</span> == <span class="keyword">typeof</span> e.onclick &amp;&amp; e.onclick;</span><br><span class="line">        e.onclick = <span class="function"><span class="keyword">function</span> (<span class="params">e</span>) </span>&#123;</span><br><span class="line">            t &amp;&amp; t(), i(e)</span><br><span class="line">        &#125;</span><br><span class="line">    &#125;</span><br><span class="line">    <span class="function"><span class="keyword">function</span> <span class="title">i</span>(<span class="params">e</span>) </span>&#123;</span><br><span class="line">        <span class="keyword">var</span> a = t.createElement(<span class="string">"div"</span>);</span><br><span class="line">        a.className = <span class="string">"heart"</span>, d.push(&#123;</span><br><span class="line">            el: a,</span><br><span class="line">            x: e.clientX - <span class="number">5</span>,</span><br><span class="line">            y: e.clientY - <span class="number">5</span>,</span><br><span class="line">            scale: <span class="number">1</span>,</span><br><span class="line">            alpha: <span class="number">1</span>,</span><br><span class="line">            color: s()</span><br><span class="line">        &#125;), t.body.appendChild(a)</span><br><span class="line">    &#125;</span><br><span class="line">    <span class="function"><span class="keyword">function</span> <span class="title">c</span>(<span class="params">e</span>) </span>&#123;</span><br><span class="line">        <span class="keyword">var</span> a = t.createElement(<span class="string">"style"</span>);</span><br><span class="line">        a.type = <span class="string">"text/css"</span>;</span><br><span class="line">        <span class="keyword">try</span> &#123;</span><br><span class="line">            a.appendChild(t.createTextNode(e))</span><br><span class="line">        &#125; <span class="keyword">catch</span> (t) &#123;</span><br><span class="line">            a.styleSheet.cssText = e</span><br><span class="line">        &#125;</span><br><span class="line">        t.getElementsByTagName(<span class="string">"head"</span>)[<span class="number">0</span>].appendChild(a)</span><br><span class="line">    &#125;</span><br><span class="line">    <span class="function"><span class="keyword">function</span> <span class="title">s</span>(<span class="params"></span>) </span>&#123;</span><br><span class="line">        <span class="keyword">return</span> <span class="string">"rgb("</span> + ~~(<span class="number">255</span> * <span class="built_in">Math</span>.random()) + <span class="string">","</span> + ~~(<span class="number">255</span> * <span class="built_in">Math</span>.random()) + <span class="string">","</span> + ~~(<span class="number">255</span> * <span class="built_in">Math</span>.random()) + <span class="string">")"</span></span><br><span class="line">    &#125;</span><br><span class="line">    <span class="keyword">var</span> d = [];</span><br><span class="line">    e.requestAnimationFrame = <span class="function"><span class="keyword">function</span> (<span class="params"></span>) </span>&#123;</span><br><span class="line">        <span class="keyword">return</span> e.requestAnimationFrame || e.webkitRequestAnimationFrame || e.mozRequestAnimationFrame || e.oRequestAnimationFrame || e.msRequestAnimationFrame || <span class="function"><span class="keyword">function</span> (<span class="params">e</span>) </span>&#123;</span><br><span class="line">            setTimeout(e, <span class="number">1e3</span> / <span class="number">60</span>)</span><br><span class="line">        &#125;</span><br><span class="line">    &#125;(), n()</span><br><span class="line">&#125;(<span class="built_in">window</span>, <span class="built_in">document</span>);</span><br></pre></td></tr></table></figure>
</blockquote>
</li>
<li><p>修改ejs文件，找到<code>themes\yilia\layout\_partial\after-footer.ejs</code></p>
<blockquote>
<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line"># 添加</span><br><span class="line"><span class="comment">&lt;!--页面点击小红心--&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">script</span> <span class="attr">type</span>=<span class="string">"text/javascript"</span> <span class="attr">src</span>=<span class="string">"/clicklove.js"</span>&gt;</span><span class="tag">&lt;/<span class="name">script</span>&gt;</span></span><br></pre></td></tr></table></figure>

<p>注意：这里的路径要对应之前创建clicklove.ejs的地方</p>
</blockquote>
</li>
</ul>
<h4 id="12-2-光玉特效"><a href="#12-2-光玉特效" class="headerlink" title="12.2 光玉特效"></a>12.2 光玉特效</h4><ul>
<li><p>新建snow.js文件，路径：<code>themes\yilia\source\</code></p>
<blockquote>
<figure class="highlight js"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br><span class="line">44</span><br><span class="line">45</span><br><span class="line">46</span><br><span class="line">47</span><br><span class="line">48</span><br><span class="line">49</span><br><span class="line">50</span><br><span class="line">51</span><br><span class="line">52</span><br><span class="line">53</span><br><span class="line">54</span><br><span class="line">55</span><br><span class="line">56</span><br><span class="line">57</span><br><span class="line">58</span><br><span class="line">59</span><br><span class="line">60</span><br><span class="line">61</span><br><span class="line">62</span><br><span class="line">63</span><br><span class="line">64</span><br><span class="line">65</span><br><span class="line">66</span><br><span class="line">67</span><br><span class="line">68</span><br><span class="line">69</span><br><span class="line">70</span><br><span class="line">71</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">var</span> snow = &#123;</span><br><span class="line">  info: &#123;</span><br><span class="line">    top: <span class="number">0</span>,</span><br><span class="line">    left: <span class="number">0</span>,</span><br><span class="line">    zIndex: <span class="number">500</span>,</span><br><span class="line">    number: <span class="number">70</span></span><br><span class="line">  &#125;,</span><br><span class="line">  down: <span class="function"><span class="keyword">function</span> (<span class="params"></span>) </span>&#123;</span><br><span class="line">    <span class="keyword">var</span> f = <span class="built_in">window</span>.innerWidth;</span><br><span class="line">    <span class="keyword">var</span> g = <span class="built_in">window</span>.innerHeight;</span><br><span class="line">    <span class="keyword">var</span> d = <span class="built_in">document</span>.createElement(<span class="string">"canvas"</span>);</span><br><span class="line">    d.style.position = <span class="string">"fixed"</span>;</span><br><span class="line">    d.style.pointerEvents = <span class="string">"none"</span>;</span><br><span class="line">    d.style.top = snow.info.top + <span class="string">"px"</span>;</span><br><span class="line">    d.style.left = snow.info.left + <span class="string">"px"</span>;</span><br><span class="line">    d.style.zIndex = snow.info.zIndex;</span><br><span class="line">    d.width = f;</span><br><span class="line">    d.height = g;</span><br><span class="line">    <span class="built_in">document</span>.body.appendChild(d);</span><br><span class="line">    <span class="keyword">var</span> c = [];</span><br><span class="line">    <span class="keyword">for</span> (<span class="keyword">var</span> a = <span class="number">0</span>; a &lt; snow.info.number; a++) &#123;</span><br><span class="line">      c.push(&#123;</span><br><span class="line">        x: <span class="built_in">Math</span>.random() * f,</span><br><span class="line">        y: <span class="built_in">Math</span>.random() * g,</span><br><span class="line">        r: <span class="built_in">Math</span>.random() * <span class="number">4</span> + <span class="number">1</span>,</span><br><span class="line">        n: <span class="built_in">Math</span>.random() * <span class="number">70</span></span><br><span class="line">      &#125;)</span><br><span class="line">    &#125;</span><br><span class="line">    <span class="keyword">var</span> b = d.getContext(<span class="string">"2d"</span>);</span><br><span class="line">    <span class="keyword">var</span> e = <span class="number">0</span>;</span><br><span class="line">    setInterval(<span class="function"><span class="keyword">function</span> (<span class="params"></span>) </span>&#123;</span><br><span class="line">        b.clearRect(<span class="number">0</span>, <span class="number">0</span>, f, g);</span><br><span class="line">        b.fillStyle = <span class="string">"rgba(233,235,154, 1)"</span>;</span><br><span class="line">        b.shadowBlur = <span class="number">5</span>;</span><br><span class="line">        b.shadowColor = <span class="string">"rgba(250,250,210 2)"</span>;</span><br><span class="line">        b.beginPath();</span><br><span class="line">        <span class="keyword">for</span> (<span class="keyword">var</span> j = <span class="number">0</span>; j &lt; <span class="number">70</span>; j++) &#123;</span><br><span class="line">          <span class="keyword">var</span> h = c[j];</span><br><span class="line">          b.moveTo(h.x, h.y);</span><br><span class="line">          b.arc(h.x, h.y, h.r, <span class="number">0</span>, <span class="built_in">Math</span>.PI * <span class="number">2</span>, <span class="number">0</span>)</span><br><span class="line">        &#125;</span><br><span class="line">        b.fill();</span><br><span class="line">        e += <span class="number">0.01</span>;</span><br><span class="line">        <span class="keyword">for</span> (<span class="keyword">var</span> j = <span class="number">0</span>; j &lt; <span class="number">70</span>; j++) &#123;</span><br><span class="line">          <span class="keyword">var</span> h = c[j];</span><br><span class="line">          h.y += <span class="built_in">Math</span>.cos(e + h.n) + h.r / <span class="number">2</span>;</span><br><span class="line">          h.x += <span class="built_in">Math</span>.sin(e) * <span class="number">2</span>;</span><br><span class="line">          <span class="keyword">if</span> (h.x &gt; f + <span class="number">5</span> || h.x &lt; <span class="number">-5</span> || h.y &gt; g) &#123;</span><br><span class="line">            c[j] = j % <span class="number">3</span> &gt; <span class="number">0</span> ? &#123;</span><br><span class="line">              x: <span class="built_in">Math</span>.random() * f,</span><br><span class="line">              y: <span class="number">-10</span>,</span><br><span class="line">              r: h.r,</span><br><span class="line">              n: h.n</span><br><span class="line">            &#125; : <span class="built_in">Math</span>.sin(e) &gt; <span class="number">0</span> ? &#123;</span><br><span class="line">              x: <span class="number">-5</span>,</span><br><span class="line">              y: <span class="built_in">Math</span>.random() * g,</span><br><span class="line">              r: h.r,</span><br><span class="line">              n: h.n</span><br><span class="line">            &#125; : &#123;</span><br><span class="line">              x: f + <span class="number">5</span>,</span><br><span class="line">              y: <span class="built_in">Math</span>.random() * g,</span><br><span class="line">              r: h.r,</span><br><span class="line">              n: h.n</span><br><span class="line">            &#125;</span><br><span class="line">          &#125;</span><br><span class="line">        &#125;</span><br><span class="line">      &#125;,</span><br><span class="line">      <span class="number">15</span>)</span><br><span class="line">  &#125;</span><br><span class="line">&#125;;</span><br><span class="line"><span class="comment">// yilia-plus主题已经集成了，可以直接用</span></span><br></pre></td></tr></table></figure>
</blockquote>
</li>
<li><p>修改<code>themes\yilia\layout\layout.ejs</code>文件</p>
<blockquote>
<p>添加</p>
<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment">&lt;!--雪花特效--&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">%</span> <span class="attr">if</span> (<span class="attr">theme.snow</span>)&#123; %&gt;</span></span><br><span class="line">  <span class="tag">&lt;<span class="name">script</span> <span class="attr">type</span>=<span class="string">"text/javascript"</span> <span class="attr">src</span>=<span class="string">"&lt;%- url_for('snow.js') %&gt;"</span>&gt;</span><span class="tag">&lt;/<span class="name">script</span>&gt;</span></span><br><span class="line">  <span class="tag">&lt;<span class="name">script</span> <span class="attr">type</span>=<span class="string">"text/javascript"</span> <span class="attr">src</span>=<span class="string">"&lt;%- url_for('jquery-2.1.4.min.js') %&gt;"</span>&gt;</span><span class="tag">&lt;/<span class="name">script</span>&gt;</span></span><br><span class="line">  <span class="tag">&lt;<span class="name">script</span>&gt;</span></span><br><span class="line">    snow.down();</span><br><span class="line"><span class="javascript">    $(<span class="built_in">window</span>).resize(<span class="function"><span class="keyword">function</span>(<span class="params"></span>) </span>&#123;</span></span><br><span class="line"><span class="javascript">      $(<span class="string">"canvas"</span>).css(<span class="string">"z-index"</span>,<span class="string">"500"</span>).remove();</span></span><br><span class="line">      snow.down();</span><br><span class="line">    &#125;);</span><br><span class="line">  <span class="tag">&lt;/<span class="name">script</span>&gt;</span></span><br><span class="line">  <span class="tag">&lt;<span class="name">%</span> &#125; %&gt;</span></span><br></pre></td></tr></table></figure>
</blockquote>
</li>
<li><p>修改主题配置文件<code>themes\yilia\_config.yml</code></p>
<blockquote>
<figure class="highlight yml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># 飘雪特效</span></span><br><span class="line"><span class="comment"># https://github.com/MlgmXyysd/snow.js</span></span><br><span class="line"><span class="attr">snow:</span> <span class="literal">true</span></span><br></pre></td></tr></table></figure>
</blockquote>
</li>
</ul>
<hr>
<h3 id="13-SEO优化"><a href="#13-SEO优化" class="headerlink" title="13. SEO优化"></a>13. SEO优化</h3><ul>
<li><p>SEO(Search Engine Optimization)搜索引擎优化</p>
<blockquote>
<p>搜索引擎优化是一种利用搜索引擎的搜索规则来提高目的网站在有关搜索引擎内的排名的方式。</p>
</blockquote>
<ul>
<li>针对个人网站的页面排版进行SEO的优化</li>
<li>针对搜索引擎进行主动的优化</li>
</ul>
</li>
</ul>
<h4 id="13-1-加密文章URL"><a href="#13-1-加密文章URL" class="headerlink" title="13.1 加密文章URL"></a>13.1 加密文章URL</h4><blockquote>
<p>博客默认的地址 <code>网址/年/月/日/文章名</code> 格式不便于搜索引擎抓取，需要进行优化</p>
<p>注意：修改之后旧文章的统计数据(浏览量)会重新计数。</p>
</blockquote>
<ul>
<li><p>安装插件 hexo-abbrlink </p>
<blockquote>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">npm install hexo-abbrlink --save</span><br></pre></td></tr></table></figure>
</blockquote>
</li>
<li><p>修改根目录配置文件_config.yml</p>
<blockquote>
<p>查找</p>
<figure class="highlight yml"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><span class="attr">permalink:</span> <span class="string">:year/:month/:day/:title/</span> </span><br></pre></td></tr></table></figure>

<p>修改</p>
<figure class="highlight yml"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><span class="attr">permalink:</span> <span class="string">post/:abbrlink.html</span></span><br></pre></td></tr></table></figure>

<p>并在下面添加：</p>
<figure class="highlight yml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line"><span class="attr">abbrlink:</span></span><br><span class="line">  <span class="attr">alg:</span> <span class="string">crc32</span>  <span class="comment"># 算法</span></span><br><span class="line">  <span class="attr">rep:</span> <span class="string">hex</span>    <span class="comment"># 进制</span></span><br></pre></td></tr></table></figure>
</blockquote>
</li>
</ul>
<h4 id="13-2-添加站点地图SiteMap"><a href="#13-2-添加站点地图SiteMap" class="headerlink" title="13.2 添加站点地图SiteMap"></a>13.2 添加站点地图SiteMap</h4><ul>
<li><p>安装插件 hexo-generator-sitemap </p>
</li>
<li><p>安装插件 hexo-generator-baidu-sitemap </p>
<blockquote>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">npm install hexo-generator-sitemap --save     //默认的</span><br><span class="line">npm install hexo-generator-baidu-sitemap --save    //百度专属</span><br></pre></td></tr></table></figure>
</blockquote>
</li>
<li><p>重新清理、渲染</p>
<blockquote>
<p>pulic文件夹下会生成一个sitmap.xml文件</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">hexo clean</span><br><span class="line">hexo g</span><br></pre></td></tr></table></figure>
</blockquote>
</li>
<li><p>注意：sitemap 的初衷是给搜索引擎看的，为了提高搜索引擎对自己站点的收录效果，可以：</p>
<ul>
<li>手动到 Google 和百度等搜索引擎提交 sitemap.xml</li>
<li>添加蜘蛛协议 robots，新建robots.txt文件，添加以下文件内容，把robots.txt放在hexo站点的source文件下</li>
</ul>
</li>
</ul>
<h4 id="13-3-注册百度站长平台"><a href="#13-3-注册百度站长平台" class="headerlink" title="13.3 注册百度站长平台"></a>13.3 注册百度站长平台</h4><ul>
<li><p>在百度站长平台添加网站</p>
<blockquote>
<p><a href="https://ziyuan.baidu.com/" target="_blank" rel="noopener">百度搜索资源平台</a>→用户中心→站点管理→添加网站</p>
<p>添加需要管理的网站地址</p>
</blockquote>
</li>
<li><p>验证网站：三种方法——本文选用html标签验证</p>
<ul>
<li><p>文件验证</p>
<blockquote>
<p>将百度验证文件放在网站首页下，即：博客根目录/source下</p>
<p>但是hexo在渲染生成时，会修改html文件，导致验证失败</p>
</blockquote>
</li>
<li><p>html标签验证</p>
<blockquote>
<p>将html验证代码添加到网站首页HTML代码的<head>标签之间</p>
<p>在 根目录/themes/yourtheme/layout/_partial/head.ejs 中添加如下代码:</p>
<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">meta</span> <span class="attr">name</span>=<span class="string">"baidu-site-verification"</span> <span class="attr">content</span>=<span class="string">"RdypQbGwZW"</span> /&gt;</span></span><br></pre></td></tr></table></figure>
</blockquote>
</li>
<li><p>Cname</p>
<blockquote>
<p>将RdypQbGwZW.yoursite使用CNAME解析到ziyuan.baidu.com</p>
</blockquote>
</li>
</ul>
</li>
</ul>
<h4 id="13-4-针对百度搜索引擎的优化"><a href="#13-4-针对百度搜索引擎的优化" class="headerlink" title="13.4 针对百度搜索引擎的优化"></a>13.4 针对百度搜索引擎的优化</h4><ul>
<li><p>提交SiteMap站点地图文件</p>
<blockquote>
<p>转到普通收录，选择自己的站点网址。</p>
<p>自动提交，选择sitemap。按照提示的格式添加自己的sitemap文件</p>
<figure class="highlight yml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line"><span class="string">https://chthollists.github.io/sitemap.xml</span></span><br><span class="line"><span class="string">https://chthollists.github.io/baidusitemap.xml</span></span><br></pre></td></tr></table></figure>
</blockquote>
</li>
<li><p>添加<strong>蜘蛛协议</strong> robots</p>
<blockquote>
<p>新建robots.txt文件，添加以下文件内容，把robots.txt放在hexo站点的source文件下</p>
<figure class="highlight yml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># hexo robots.txt</span></span><br><span class="line"><span class="attr">User-agent:</span> <span class="string">*</span> <span class="attr">Allow:</span> <span class="string">/</span></span><br><span class="line"><span class="attr">Allow:</span> <span class="string">/archives/</span></span><br><span class="line"><span class="attr">Disallow:</span> <span class="string">/vendors/</span></span><br><span class="line"><span class="attr">Disallow:</span> <span class="string">/js/</span></span><br><span class="line"><span class="attr">Disallow:</span> <span class="string">/css/</span></span><br><span class="line"><span class="attr">Disallow:</span> <span class="string">/fonts/</span></span><br><span class="line"><span class="attr">Disallow:</span> <span class="string">/vendors/</span></span><br><span class="line"><span class="attr">Disallow:</span> <span class="string">/fancybox/</span></span><br><span class="line"></span><br><span class="line"><span class="attr">Sitemap:</span> <span class="string">https://chthollists.github.io/sitemap.xml</span></span><br><span class="line"><span class="attr">Sitemap:</span> <span class="string">https://chthollists.github.io/baidusitemap.xml</span></span><br></pre></td></tr></table></figure>

<p>可以在<a href="https://ziyuan.baidu.com/" target="_blank" rel="noopener">百度搜索资源平台</a>验证文件是否生效</p>
</blockquote>
</li>
</ul>
<h4 id="13-5-网站结构自身优化"><a href="#13-5-网站结构自身优化" class="headerlink" title="13.5 网站结构自身优化"></a>13.5 网站结构自身优化</h4><ul>
<li><p>keywords 和 description</p>
<blockquote>
<p>在\scaffolds\post.md中添加如下代码，用于生成的文章中添加关键字和描述。</p>
<figure class="highlight yml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line"><span class="attr">keywords:</span> <span class="comment">#文章关键词，多个关键词用英文逗号隔开</span></span><br><span class="line"><span class="attr">description:</span> <span class="comment">#文章描述，便于搜索引擎用关键词检索</span></span><br></pre></td></tr></table></figure>
</blockquote>
</li>
<li><p>文章地址优化</p>
<blockquote>
<p>参见13.1 加密URL</p>
</blockquote>
</li>
</ul>
<hr>
<h3 id="14-百度推送收录功能"><a href="#14-百度推送收录功能" class="headerlink" title="14. 百度推送收录功能"></a>14. 百度推送收录功能</h3><ul>
<li>除了通过提交SiteMap文件推送网站的地址外，还有自动提交：主动推送、自动推送，手动提交方式。详情参考<a href="https://zhuanlan.zhihu.com/p/100922816" target="_blank" rel="noopener">Hexo实现百度收录</a></li>
<li>由于Github Pages上禁止百度爬虫，所以需要把Hexo博客部署到双线服务器上，选择Coding Pages，详情参考<a href="https://blog.csdn.net/qq_36759224/article/details/100879609" target="_blank" rel="noopener">Hexo双线部署CodingPages</a></li>
<li><a href="http://mfln8n.coding-pages.com/">Hexo博客+Coding Pages</a></li>
</ul>
<h4 id="14-1-新增博客文章页面自动推送"><a href="#14-1-新增博客文章页面自动推送" class="headerlink" title="14.1 新增博客文章页面自动推送"></a>14.1 新增博客文章页面自动推送</h4><ul>
<li><p>修改文件 &lt;博客根目录&gt;/themes/yilia/layout/_partial/article.ejs</p>
<blockquote>
<p>查找</p>
<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">%</span></span></span><br><span class="line"><span class="tag">        <span class="attr">var</span> <span class="attr">sUrl</span> = <span class="string">url.replace(/index\.html$/,</span> '');</span></span><br><span class="line"><span class="tag">        <span class="attr">sUrl</span> = <span class="string">/^(http:|https:)\/\//.test(sUrl)</span> ? <span class="attr">sUrl</span> <span class="attr">:</span> '<span class="attr">https:</span>' + <span class="attr">sUrl</span>;</span></span><br><span class="line"><span class="tag">      %&gt;</span></span><br></pre></td></tr></table></figure>

<p>在<strong>前面</strong>添加</p>
<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br></pre></td><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">!-</span> 百度自动推送方式提交 <span class="attr">--</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">%</span> <span class="attr">if</span> (<span class="attr">1</span>)&#123; %&gt;</span></span><br><span class="line">  <span class="tag">&lt;<span class="name">script</span>&gt;</span></span><br><span class="line"><span class="actionscript">  (<span class="function"><span class="keyword">function</span><span class="params">()</span></span>&#123;</span></span><br><span class="line"><span class="javascript">      <span class="keyword">var</span> bp = <span class="built_in">document</span>.createElement(<span class="string">'script'</span>);</span></span><br><span class="line"><span class="javascript">      <span class="keyword">var</span> curProtocol = <span class="built_in">window</span>.location.protocol.split(<span class="string">':'</span>)[<span class="number">0</span>];</span></span><br><span class="line"><span class="actionscript">      <span class="keyword">if</span> (curProtocol === <span class="string">'https'</span>) &#123;</span></span><br><span class="line"><span class="actionscript">          bp.src = <span class="string">'https://zz.bdstatic.com/linksubmit/push.js'</span>;</span></span><br><span class="line">      &#125;</span><br><span class="line"><span class="actionscript">      <span class="keyword">else</span> &#123;</span></span><br><span class="line"><span class="actionscript">          bp.src = <span class="string">'http://push.zhanzhang.baidu.com/push.js'</span>;</span></span><br><span class="line">      &#125;</span><br><span class="line"><span class="javascript">      <span class="keyword">var</span> s = <span class="built_in">document</span>.getElementsByTagName(<span class="string">"script"</span>)[<span class="number">0</span>];</span></span><br><span class="line">      s.parentNode.insertBefore(bp, s);</span><br><span class="line">  &#125;)();</span><br><span class="line">  <span class="tag">&lt;/<span class="name">script</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">%</span> &#125; %&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">!-</span> 百度自动推送方式提交结束 <span class="attr">--</span>&gt;</span></span><br></pre></td></tr></table></figure>
</blockquote>
</li>
<li><p>注意：只会主自动推送新增博客文章页面，不包括其他页面。</p>
</li>
</ul>
<h4 id="14-2-主动推送"><a href="#14-2-主动推送" class="headerlink" title="14.2 主动推送"></a>14.2 主动推送</h4><blockquote>
<p>主动推送最为快速的提交方式，是被百度收录最快的推送方式。</p>
<p>其实现原理如下：</p>
<p>新链接的产生， hexo generate 会产生一个文本文件，里面包含最新的链接；</p>
<p>新链接的提交， hexo deploy 会从上述文件中读取链接，提交至百度搜索引擎。</p>
</blockquote>
<ul>
<li><p>安装插件 hexo-baidu-url-submi</p>
<blockquote>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">npm install hexo-baidu-url-submit --save</span><br></pre></td></tr></table></figure>
</blockquote>
</li>
<li><p>修改博客根目录配置文件_config.yml</p>
<blockquote>
<p>添加</p>
<figure class="highlight yml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line"><span class="attr">baidu_url_submit:</span></span><br><span class="line">  <span class="attr">count:</span> <span class="number">20</span> <span class="comment">## 提交最新的20个链接</span></span><br><span class="line">  <span class="attr">host:</span> <span class="string">http://mfln8n.coding-pages.com/</span> <span class="comment">## 百度站长平台中注册的域名</span></span><br><span class="line">  <span class="attr">token:</span>  <span class="comment">## 16位准入秘钥</span></span><br><span class="line">  <span class="attr">path:</span> <span class="string">baidu_urls.txt</span> <span class="comment">## 文本文档的地址， 新链接会保存在此文本文档里</span></span><br></pre></td></tr></table></figure>
</blockquote>
</li>
<li><p>获取准入秘钥</p>
<blockquote>
<p>在<a href="https://ziyuan.baidu.com/" target="_blank" rel="noopener">百度搜索资源平台</a>的平台收录中获取准入秘钥token —16位</p>
</blockquote>
</li>
<li><p>查看根目录下的_config.yml文件中url的值， 必须包含是百度站长平台注册的域名</p>
<blockquote>
<p>如：</p>
<figure class="highlight yml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># URL</span></span><br><span class="line"><span class="attr">url:</span> <span class="string">http://mfln8n.coding-pages.com/</span></span><br><span class="line"><span class="attr">root:</span> <span class="string">/</span></span><br></pre></td></tr></table></figure>
</blockquote>
</li>
<li><p>加入新的deployer:</p>
<blockquote>
<figure class="highlight yml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br></pre></td><td class="code"><pre><span class="line"><span class="attr">deploy:</span></span><br><span class="line"> <span class="bullet">-</span> <span class="attr">type:</span> <span class="string">git</span></span><br><span class="line">   <span class="attr">repo:</span> <span class="string">git@github.com:xxxxx</span></span><br><span class="line">   <span class="attr">branch:</span> <span class="string">master</span></span><br><span class="line">   <span class="comment"># 加入新的type</span></span><br><span class="line"> <span class="bullet">-</span> <span class="attr">type:</span> <span class="string">baidu_url_submitter</span> <span class="comment">## 添加这里内容即可</span></span><br></pre></td></tr></table></figure>
</blockquote>
</li>
</ul>
<h4 id="14-3-自动推送"><a href="#14-3-自动推送" class="headerlink" title="14.3 自动推送"></a>14.3 自动推送</h4><ul>
<li><p>安装自动推送JS代码的网页，在页面被访问时，页面URL将立即被推送给百度。</p>
</li>
<li><p>修改主题目录下的layout/post.ejs文件</p>
<blockquote>
<p>末尾添加自动推送代码：</p>
<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br></pre></td><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">script</span>&gt;</span></span><br><span class="line"><span class="actionscript">(<span class="function"><span class="keyword">function</span><span class="params">()</span></span>&#123;</span></span><br><span class="line"><span class="javascript">    <span class="keyword">var</span> bp = <span class="built_in">document</span>.createElement(<span class="string">'script'</span>);</span></span><br><span class="line"><span class="javascript">    <span class="keyword">var</span> curProtocol = <span class="built_in">window</span>.location.protocol.split(<span class="string">':'</span>)[<span class="number">0</span>];</span></span><br><span class="line"><span class="actionscript">    <span class="keyword">if</span> (curProtocol === <span class="string">'https'</span>) &#123;</span></span><br><span class="line"><span class="actionscript">        bp.src = <span class="string">'https://zz.bdstatic.com/linksubmit/push.js'</span>;</span></span><br><span class="line">    &#125;</span><br><span class="line"><span class="actionscript">    <span class="keyword">else</span> &#123;</span></span><br><span class="line"><span class="actionscript">        bp.src = <span class="string">'http://push.zhanzhang.baidu.com/push.js'</span>;</span></span><br><span class="line">    &#125;</span><br><span class="line"><span class="javascript">    <span class="keyword">var</span> s = <span class="built_in">document</span>.getElementsByTagName(<span class="string">"script"</span>)[<span class="number">0</span>];</span></span><br><span class="line">    s.parentNode.insertBefore(bp, s);</span><br><span class="line">&#125;)();</span><br><span class="line"><span class="tag">&lt;/<span class="name">script</span>&gt;</span></span><br></pre></td></tr></table></figure>
</blockquote>
</li>
</ul>
<hr>
<h3 id="15-百度统计功能"><a href="#15-百度统计功能" class="headerlink" title="15. 百度统计功能"></a>15. 百度统计功能</h3><ul>
<li><p>在<a href="https://tongji.baidu.com" target="_blank" rel="noopener">百度统计官网</a>上添加网站，获取统计代码</p>
<blockquote>
<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br></pre></td><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">script</span>&gt;</span></span><br><span class="line"><span class="actionscript"><span class="keyword">var</span> _hmt = _hmt || [];</span></span><br><span class="line"><span class="actionscript">(<span class="function"><span class="keyword">function</span><span class="params">()</span> </span>&#123;</span></span><br><span class="line"><span class="javascript">  <span class="keyword">var</span> hm = <span class="built_in">document</span>.createElement(<span class="string">"script"</span>);</span></span><br><span class="line"><span class="actionscript">  hm.src = <span class="string">"https://hm.baidu.com/hm.js?0113964bae57c4e8dcc0a90d835680c4"</span>;</span></span><br><span class="line"><span class="javascript">  <span class="keyword">var</span> s = <span class="built_in">document</span>.getElementsByTagName(<span class="string">"script"</span>)[<span class="number">0</span>]; </span></span><br><span class="line">  s.parentNode.insertBefore(hm, s);</span><br><span class="line">&#125;)();</span><br><span class="line"><span class="tag">&lt;/<span class="name">script</span>&gt;</span></span><br></pre></td></tr></table></figure>
</blockquote>
</li>
<li><p>修改文件<code>themes/yilia/layout/_partial/baidu-analytics.ejs</code></p>
</li>
<li><p>或者新建文件<code>themes/yilia/layout/baidu-tongji.ejs</code></p>
<blockquote>
<p>将获取的统计代码添加进去</p>
<p><code>baidu-analytics.ejs</code></p>
<p>或者</p>
<p>在<code>baidu-tongji.ejs</code>中</p>
<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">%</span> <span class="attr">if</span> (<span class="attr">theme.baidu_tongji</span>) &#123; %&gt;</span></span><br><span class="line">   //这里添加统计代码</span><br><span class="line"><span class="tag">&lt;<span class="name">%</span> &#125; %&gt;</span></span><br></pre></td></tr></table></figure>
</blockquote>
</li>
<li><p>修改主题的配置文件<code>themes/yilia/_config.yml</code></p>
<blockquote>
<figure class="highlight yml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br></pre></td><td class="code"><pre><span class="line"><span class="attr">baidu_analytics:</span> <span class="string">''</span></span><br><span class="line"><span class="comment"># 改为</span></span><br><span class="line"><span class="attr">baidu_analytics:</span> <span class="literal">true</span></span><br><span class="line"></span><br><span class="line"><span class="comment"># 或者</span></span><br><span class="line"><span class="comment"># 新建属性</span></span><br><span class="line"><span class="attr">baidu_tongji:</span> <span class="literal">true</span></span><br></pre></td></tr></table></figure>
</blockquote>
</li>
<li><p>注意：如果是新建的<code>baidu-tongji.ejs</code>文件</p>
<blockquote>
<p>还需要在<code>themes\yilia\layout\_partial\head.ejs</code>,在<code>&lt;/head&gt;</code>上面添加：</p>
<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">%-</span> <span class="attr">partial</span>("<span class="attr">baidu_tongji</span>") %&gt;</span></span><br></pre></td></tr></table></figure>
</blockquote>
</li>
<li><p>可以通过百度统计的<a href="https://tongji.baidu.com/sc-web/10000247748/home/js/check?siteId=15660763" target="_blank" rel="noopener">代码安装检查</a>功能来验证百度统计功能是否添加成功。</p>
</li>
</ul>
<hr>
<h3 id="16-评论系统"><a href="#16-评论系统" class="headerlink" title="16. 评论系统"></a>16. 评论系统</h3><h4 id="16-1-注册Leancloud"><a href="#16-1-注册Leancloud" class="headerlink" title="16.1 注册Leancloud"></a>16.1 注册Leancloud</h4><ul>
<li><p><a href="https://www.leancloud.cn/" target="_blank" rel="noopener">官网</a></p>
</li>
<li><p><a href="https://leancloud.cn/dashboard/login.html#/signup" target="_blank" rel="noopener">注册页面</a></p>
</li>
<li><p><a href="https://leancloud.cn/dashboard/applist.html#/newapp" target="_blank" rel="noopener">创建应用</a>：Hexo Blog Comment</p>
</li>
<li><p>获取Key</p>
<blockquote>
<p>选择刚刚创建的应用&gt;设置&gt;选择应用 Keys</p>
<p>获取APP ID和APP KEY了</p>
<figure class="highlight yml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line"><span class="attr">APP ID :</span> <span class="string">IbB069kzjoJ6yrtHz3F47kAh-gzGzoHsz</span></span><br><span class="line"><span class="attr">APP Key :</span> <span class="string">seteWK1qk6nSC5zBcB2TFfWi</span></span><br></pre></td></tr></table></figure>
</blockquote>
</li>
<li><p>设置Web安全域名</p>
<blockquote>
<p>设置的安全中心中设置</p>
<figure class="highlight yml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line"><span class="string">http://mfln8n.coding-pages.com</span></span><br><span class="line"><span class="string">https://chthollists.github.io</span></span><br></pre></td></tr></table></figure>
</blockquote>
</li>
</ul>
<h4 id="16-2-修改配置文件"><a href="#16-2-修改配置文件" class="headerlink" title="16.2 修改配置文件"></a>16.2 修改配置文件</h4><ul>
<li><p>修改<code>theme/yilia/layout/_partial/article.ejs</code></p>
<blockquote>
<p>在最末尾加上</p>
<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br></pre></td><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">%</span> <span class="attr">if</span> ((<span class="attr">theme.valine_type</span> === <span class="string">2</span> || (<span class="attr">theme.valine_type</span> === <span class="string">1</span> &amp;&amp; <span class="attr">post.valineenbale</span>)) &amp;&amp; !<span class="attr">index</span>)&#123; %&gt;</span></span><br><span class="line">  <span class="tag">&lt;<span class="name">%</span> <span class="attr">if</span> (<span class="attr">theme.valine</span> &amp;&amp; <span class="attr">theme.valine.appid</span> &amp;&amp; <span class="attr">theme.valine.appkey</span>)&#123; %&gt;</span></span><br><span class="line">      <span class="tag">&lt;<span class="name">section</span> <span class="attr">id</span>=<span class="string">"comments"</span> <span class="attr">class</span>=<span class="string">"comments"</span>&gt;</span></span><br><span class="line">        <span class="tag">&lt;<span class="name">style</span>&gt;</span></span><br><span class="line"><span class="css">          <span class="selector-class">.comments</span>&#123;<span class="attribute">margin</span>:<span class="number">30px</span>;<span class="attribute">padding</span>:<span class="number">10px</span>;<span class="attribute">background</span>:<span class="number">#fff</span>&#125;</span></span><br><span class="line"><span class="css">          <span class="keyword">@media</span> screen <span class="keyword">and</span> (<span class="attribute">max-width:</span><span class="number">800px</span>)&#123;<span class="selector-class">.comments</span>&#123;<span class="attribute">margin</span>:auto;<span class="attribute">padding</span>:<span class="number">10px</span>;<span class="attribute">background</span>:<span class="number">#fff</span>&#125;&#125;</span></span><br><span class="line">        <span class="tag">&lt;/<span class="name">style</span>&gt;</span></span><br><span class="line">        <span class="tag">&lt;<span class="name">%-</span> <span class="attr">partial</span>('<span class="attr">post</span>/<span class="attr">valine</span>', &#123;</span></span><br><span class="line"><span class="tag">          <span class="attr">key:</span> <span class="attr">post.slug</span>,</span></span><br><span class="line"><span class="tag">          <span class="attr">title:</span> <span class="attr">post.title</span>,</span></span><br><span class="line"><span class="tag">          <span class="attr">url:</span> <span class="attr">config.url</span>+<span class="attr">url_for</span>(<span class="attr">post.path</span>)</span></span><br><span class="line"><span class="tag">          &#125;) %&gt;</span></span><br><span class="line">    <span class="tag">&lt;/<span class="name">section</span>&gt;</span></span><br><span class="line">  <span class="tag">&lt;<span class="name">%</span> &#125; %&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">%</span> &#125; %&gt;</span></span><br></pre></td></tr></table></figure>
</blockquote>
</li>
<li><p>修改<code>theme/yilia/_config.yml</code></p>
<blockquote>
<p>添加</p>
<figure class="highlight yml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment">#6、Valine https://valine.js.org</span></span><br><span class="line"><span class="attr">valine_type:</span> <span class="number">1</span> <span class="comment">#0 关闭评论  2全开评论  1需要再文章md开头加入valineenbale:true</span></span><br><span class="line"><span class="attr">valine:</span> </span><br><span class="line"> <span class="attr">enable:</span> <span class="literal">true</span></span><br><span class="line"> <span class="attr">appid:</span>  <span class="string">你在注册时候得到的id</span></span><br><span class="line"> <span class="attr">appkey:</span>  <span class="string">你在注册时候得到的key</span></span><br><span class="line"> <span class="comment">#这里的appid和appkey如果配置失败可以试试改成app_id和app_key</span></span><br><span class="line"> <span class="attr">verify:</span> <span class="literal">true</span> <span class="comment">#验证码</span></span><br><span class="line"> <span class="attr">notify:</span> <span class="literal">true</span> <span class="comment">#评论回复提醒</span></span><br><span class="line"> <span class="attr">avatar:</span>  <span class="string">identicon</span>   <span class="comment">#评论列表头像样式：''/mm/identicon/monsterid/wavatar/retro/hide</span></span><br><span class="line"> <span class="attr">avatar_cdn:</span> <span class="string">''</span> <span class="comment">#头像CDN</span></span><br><span class="line"> <span class="comment">#评论框占位符</span></span><br><span class="line"> <span class="attr">placeholder:</span> <span class="string">ヾﾉ≧∀≦)o</span> <span class="string">'友情提醒，留下正确的邮箱地址可以第一时间获取评论反馈'</span></span><br><span class="line"> <span class="attr">guest_info:</span> <span class="string">nick,mail,link</span> <span class="comment"># custom comment header</span></span><br><span class="line"> <span class="attr">pageSize:</span> <span class="number">10</span> <span class="comment"># pagination size</span></span><br><span class="line"> <span class="attr">visitor:</span> <span class="literal">true</span></span><br></pre></td></tr></table></figure>
</blockquote>
</li>
<li><p>修改CDN加速：新建<code>theme/yilia/layout/_partial/post/valine.ejs</code></p>
<blockquote>
<p>官方的CDN是</p>
<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">//unpkg.com/valine/dist/Valine.min.js</span><br></pre></td></tr></table></figure>
</blockquote>
<blockquote>
<p>新建<code>valine.ejs</code>,内容</p>
<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br></pre></td><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">div</span> <span class="attr">id</span>=<span class="string">"vcomment"</span>&gt;</span><span class="tag">&lt;/<span class="name">div</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">script</span> <span class="attr">src</span>=<span class="string">"//cdn.jsdelivr.net/npm/jquery/dist/jquery.min.js"</span>&gt;</span><span class="tag">&lt;/<span class="name">script</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">script</span> <span class="attr">src</span>=<span class="string">"//cdn.jsdelivr.net/npm/leancloud-storage/dist/av-min.js"</span>&gt;</span><span class="tag">&lt;/<span class="name">script</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">script</span> <span class="attr">src</span>=<span class="string">'//cdn.jsdelivr.net/npm/valine/dist/Valine.min.js'</span>&gt;</span><span class="tag">&lt;/<span class="name">script</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">script</span>&gt;</span></span><br><span class="line"><span class="actionscript">   <span class="keyword">var</span> notify = <span class="string">'&lt;%= theme.valine.notify %&gt;'</span> == <span class="literal">true</span> ? <span class="literal">true</span> : <span class="literal">false</span>;</span></span><br><span class="line"><span class="actionscript">   <span class="keyword">var</span> verify = <span class="string">'&lt;%= theme.valine.verify %&gt;'</span> == <span class="literal">true</span> ? <span class="literal">true</span> : <span class="literal">false</span>;</span></span><br><span class="line"><span class="actionscript">   <span class="keyword">new</span> Valine(&#123;</span></span><br><span class="line">            av: AV,</span><br><span class="line"><span class="actionscript">            el: <span class="string">'#vcomment'</span>,</span></span><br><span class="line">            notify: notify,</span><br><span class="line">            verify: verify,</span><br><span class="line"><span class="actionscript">            app_id: <span class="string">"&lt;%= theme.valine.appid %&gt;"</span>,</span></span><br><span class="line"><span class="actionscript">            app_key: <span class="string">"&lt;%= theme.valine.appkey %&gt;"</span>,</span></span><br><span class="line"><span class="actionscript">            placeholder: <span class="string">"&lt;%= theme.valine.placeholder %&gt;"</span>,</span></span><br><span class="line"><span class="actionscript">            avatar: <span class="string">"&lt;%= theme.valine.avatar %&gt;"</span>,</span></span><br><span class="line"><span class="actionscript">            avatar_cdn: <span class="string">"&lt;%= theme.valine.avatar_cdn %&gt;"</span>,</span></span><br><span class="line"><span class="actionscript">            pageSize: <span class="string">"&lt;%= theme.valine.pageSize %&gt;"</span></span></span><br><span class="line">    &#125;);</span><br><span class="line"><span class="tag">&lt;/<span class="name">script</span>&gt;</span></span><br></pre></td></tr></table></figure>
</blockquote>
</li>
<li><p>如果你的valine_type: 也是1，那么然后就需要在你文章抬头加上</p>
<blockquote>
<figure class="highlight yml"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><span class="string">valineenbale:true</span></span><br></pre></td></tr></table></figure>
</blockquote>
</li>
<li><p>注意：由于不明原因没有登录功能，所以后续准备改用Gitment/Gitalk评论系统。</p>
</li>
</ul>
<h4 id="16-3-Gitalk评论系统"><a href="#16-3-Gitalk评论系统" class="headerlink" title="16.3 Gitalk评论系统"></a>16.3 Gitalk评论系统</h4><ul>
<li><p>注册(已有Github可以跳过注册)</p>
</li>
<li><p><a href="https://github.com/settings/applications/new" target="_blank" rel="noopener">创建APP应用</a></p>
<blockquote>
<figure class="highlight yml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># 创建APP的相关设置</span></span><br><span class="line"><span class="comment"># APP名称---无限制</span></span><br><span class="line"><span class="attr">Application name :</span> <span class="string">HexoBlogComment</span></span><br><span class="line"><span class="comment"># APP主页URL---无限制</span></span><br><span class="line"><span class="attr">Homepage URL :</span> <span class="string">github.com/chthollists</span></span><br><span class="line"><span class="comment"># APP 描述介绍---无限制</span></span><br><span class="line"><span class="attr">description :</span> <span class="string">Gitalk</span> <span class="string">Comment</span> <span class="string">APP</span> </span><br><span class="line"><span class="comment"># 回调地址---重要：取博客主页，要与_config.yml配置文件中的 config.url 一致</span></span><br><span class="line"><span class="attr">callback URL :</span> <span class="string">http://mfln8n.coding-pages.com</span></span><br></pre></td></tr></table></figure>
</blockquote>
</li>
<li><p>获取Client ID和Client Secret</p>
<blockquote>
<figure class="highlight yml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line"><span class="attr">Client ID:</span> <span class="string">ef41cd3f6bb938f5b4c6</span></span><br><span class="line"><span class="attr">Client Secret:</span> <span class="string">0a387b3802665d8a71757a618f93dfd8cb5ec7d8</span></span><br></pre></td></tr></table></figure>
</blockquote>
</li>
<li><p>新建Gitalk文件</p>
<blockquote>
<p>新建ejs文件<code>layout/_partial/post/gitalk.ejs</code></p>
<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br></pre></td><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">div</span> <span class="attr">id</span>=<span class="string">"gitalk-container"</span> <span class="attr">style</span>=<span class="string">"padding: 0px 30px 0px 30px;"</span>&gt;</span><span class="tag">&lt;/<span class="name">div</span>&gt;</span> </span><br><span class="line"></span><br><span class="line"><span class="tag">&lt;<span class="name">link</span> <span class="attr">rel</span>=<span class="string">"stylesheet"</span> <span class="attr">href</span>=<span class="string">"https://cdn.jsdelivr.net/npm/gitalk@1/dist/gitalk.css"</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">script</span> <span class="attr">src</span>=<span class="string">"https://cdn.jsdelivr.net/npm/gitalk@1/dist/gitalk.min.js"</span>&gt;</span><span class="tag">&lt;/<span class="name">script</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">script</span> <span class="attr">type</span>=<span class="string">"text/javascript"</span>&gt;</span></span><br><span class="line"></span><br><span class="line"><span class="handlebars"><span class="xml">if(<span class="tag">&lt;<span class="name">%=theme.gitalk.enable%</span>&gt;</span>)&#123;</span></span></span><br><span class="line"><span class="actionscript"><span class="keyword">var</span> gitalk = <span class="keyword">new</span> Gitalk(&#123;</span></span><br><span class="line"><span class="actionscript"> clientID: <span class="string">'&lt;%=theme.gitalk.ClientID%&gt;'</span>,</span></span><br><span class="line"><span class="actionscript"> clientSecret: <span class="string">'&lt;%=theme.gitalk.ClientSecret%&gt;'</span>,</span></span><br><span class="line"><span class="actionscript"> repo: <span class="string">'&lt;%=theme.gitalk.repo%&gt;'</span>,</span></span><br><span class="line"><span class="actionscript"> owner: <span class="string">'&lt;%=theme.gitalk.githubID%&gt;'</span>,</span></span><br><span class="line"><span class="actionscript"> admin: [<span class="string">'&lt;%=theme.gitalk.adminUser%&gt;'</span>],</span></span><br><span class="line"><span class="actionscript"> id: <span class="string">'&lt;%= page.date %&gt;'</span>,</span></span><br><span class="line"><span class="actionscript"> distractionFreeMode: <span class="string">'&lt;%=theme.gitalk.distractionFreeMode%&gt;'</span></span></span><br><span class="line"><span class="actionscript"> pageSize: <span class="string">"&lt;%= theme.gitalk.pageSize %&gt;"</span></span></span><br><span class="line">&#125;)</span><br><span class="line"><span class="actionscript">gitalk.render(<span class="string">'gitalk-container'</span>) </span></span><br><span class="line">&#125;</span><br><span class="line"><span class="tag">&lt;/<span class="name">script</span>&gt;</span></span><br></pre></td></tr></table></figure>
</blockquote>
</li>
<li><p>修改文件comment.scss</p>
<blockquote>
<p>完全替换<code>source-src/css/comment.scss</code>文件 </p>
<figure class="highlight css"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br></pre></td><td class="code"><pre><span class="line"><span class="selector-tag">disqus_thread</span>, <span class="selector-class">.duoshuo</span>, <span class="selector-class">.cloud-tie-wrapper</span>, <span class="selector-id">#SOHUCS</span>, <span class="selector-id">#gitment-ctn</span>, <span class="selector-id">#gitalk-container</span> &#123;</span><br><span class="line">  <span class="attribute">padding</span>: <span class="number">0</span> <span class="number">30px</span> <span class="meta">!important</span>;</span><br><span class="line">  <span class="attribute">min-height</span>: <span class="number">20px</span>;</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="selector-id">#SOHUCS</span> &#123;</span><br><span class="line">  #SOHU_MAIN .module-cmt-list .block-cont-gw &#123;</span><br><span class="line">    <span class="selector-tag">border-bottom</span>: 1<span class="selector-tag">px</span> <span class="selector-tag">dashed</span> <span class="selector-id">#c8c8c8</span> !<span class="selector-tag">important</span>;</span><br><span class="line">  &#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
</blockquote>
</li>
<li><p>修改<code>layout/_partial/article.ejs</code></p>
<blockquote>
<p>文件内新增gitalk相关的配置代码：</p>
<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br></pre></td><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">%</span> <span class="attr">if</span> ((<span class="attr">theme.gitalk_type</span> === <span class="string">2</span> || (<span class="attr">theme.gitalk_type</span> === <span class="string">1</span> &amp;&amp; <span class="attr">post.gitalkenbale</span>)) &amp;&amp; !<span class="attr">index</span>)&#123; %&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">%</span> <span class="attr">if</span>(<span class="attr">theme.gitalk.enable</span>)&#123; %&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">%-</span> <span class="attr">partial</span>('<span class="attr">post</span>/<span class="attr">gitalk</span>', &#123;</span></span><br><span class="line"><span class="tag">   <span class="attr">key:</span> <span class="attr">post.slug</span>,</span></span><br><span class="line"><span class="tag">   <span class="attr">title:</span> <span class="attr">post.title</span>,</span></span><br><span class="line"><span class="tag">   <span class="attr">url:</span> <span class="attr">config.url</span>+<span class="attr">url_for</span>(<span class="attr">post.path</span>)</span></span><br><span class="line"><span class="tag"> &#125;) %&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">%</span> &#125; %&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">%</span> &#125; %&gt;</span></span><br></pre></td></tr></table></figure>
</blockquote>
</li>
<li><p>最后修改<code>theme/yilia/_config.yml</code></p>
<blockquote>
<figure class="highlight yml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br></pre></td><td class="code"><pre><span class="line"><span class="attr">gitalk_type:</span>  <span class="number">1</span> <span class="comment">#0 关闭评论  2全开评论  1需要再文章md开头加入gitalkenbale: true</span></span><br><span class="line"><span class="attr">gitalk:</span></span><br><span class="line"><span class="attr">enable:</span> <span class="literal">true</span></span><br><span class="line"><span class="attr">githubID:</span> <span class="string">github帐号</span>     </span><br><span class="line"><span class="attr">repo:</span> <span class="string">仓库名称</span> <span class="string">(</span> <span class="string">用来存放评论的仓库名</span> <span class="string">)</span>   <span class="string">例如：blog-comments</span></span><br><span class="line"><span class="attr">ClientID:</span> <span class="string">Client</span> <span class="string">ID</span></span><br><span class="line"><span class="attr">ClientSecret:</span> <span class="string">Client</span> <span class="string">Secret</span></span><br><span class="line"><span class="attr">adminUser:</span> <span class="string">github帐号</span>   <span class="comment">#指定可初始化评论账户</span></span><br><span class="line"><span class="attr">distractionFreeMode:</span> <span class="literal">true</span></span><br></pre></td></tr></table></figure>

<figure class="highlight yml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br></pre></td><td class="code"><pre><span class="line"><span class="attr">gitalk:</span></span><br><span class="line"><span class="attr">enable:</span>  <span class="literal">true</span></span><br><span class="line"><span class="attr">githubID:</span>  <span class="string">'Chthollists'</span>   </span><br><span class="line"><span class="attr">repo:</span>  <span class="string">'chthollists.github.io'</span> <span class="comment">#这里可以另开一个也可以就用你博客的那个repo</span></span><br><span class="line"><span class="attr">ClientID:</span>  <span class="string">'xxxxxx'</span></span><br><span class="line"><span class="attr">ClientSecret:</span>  <span class="string">'xxxxxxxxxxxxxxxxxxxxxxxxx'</span></span><br><span class="line"><span class="attr">adminUser:</span>  <span class="string">'Chthollists'</span> </span><br><span class="line"><span class="attr">distractionFreeMode:</span> <span class="literal">true</span></span><br></pre></td></tr></table></figure>
</blockquote>
</li>
<li><p>注意：在Github创建OAuth APP时：</p>
<ul>
<li><p>如果博客只部署在一个云端，无论是Github Pages、Gitee Pages、Coding Pages还是个人搭建的云服务器，回调地址callback URL都选择博客主页</p>
</li>
<li><p>而当博客双线部署在多个云端时，会出现Error : Network Error 错误，此时回调地址callback URL要与_config.yml配置文件中的 config.url 一致，不然会无法登陆。</p>
<blockquote>
<figure class="highlight yml"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><span class="attr">callback URL:</span> <span class="string">http://mfln8n.coding-pages.com</span></span><br></pre></td></tr></table></figure>
</blockquote>
</li>
<li><p>参考：</p>
<blockquote>
<p><a href="https://www.cnblogs.com/liuurick/p/10713693.html" target="_blank" rel="noopener">Gitalk评论初始化无法登陆</a></p>
<p><a href="https://blog.csdn.net/w47_csdn/article/details/88858343" target="_blank" rel="noopener">Gitalk评论初始化登录时跳转回首页</a></p>
</blockquote>
</li>
</ul>
</li>
</ul>
<hr>
<h3 id="17-Live-2D功能"><a href="#17-Live-2D功能" class="headerlink" title="17. Live 2D功能"></a>17. Live 2D功能</h3><ul>
<li>Github 上的Live2D资源：<a href="https://github.com/dongshuyan/live2dDemo" target="_blank" rel="noopener">Live2D 模型</a></li>
<li><a href="https://blog.csdn.net/Aoman_Hao/article/details/82049821" target="_blank" rel="noopener">参考链接1</a>、<a href="https://qianlei6148.github.io/2018/10/11/hexo模版yilia添加可爱的看板娘" target="_blank" rel="noopener">参考链接2</a>、<a href="https://zhousiwei.gitee.io/2019/05/05/Hexo%E5%8D%9A%E5%AE%A2%E6%B7%BB%E5%8A%A0helper-live2d%E5%8A%A8%E6%80%81%E6%A8%A1%E5%9E%8B%E6%8F%92%E4%BB%B6/" target="_blank" rel="noopener">参考链接3</a></li>
</ul>
<h4 id="17-1-下载插件和模型"><a href="#17-1-下载插件和模型" class="headerlink" title="17.1  下载插件和模型"></a>17.1  下载插件和模型</h4><ul>
<li><p>安装插件 <a href="https://github.com/EYHN/hexo-helper-live2d" target="_blank" rel="noopener">hexo-helper-live2d</a></p>
<blockquote>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">npm install --save hexo-helper-live2d</span><br></pre></td></tr></table></figure>
</blockquote>
</li>
<li><p>安装2D模型：<a href="https://github.com/dongshuyan/live2dDemo" target="_blank" rel="noopener">Live2D 模型</a></p>
<blockquote>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">npm install live2d-widget-model-模型名称</span><br></pre></td></tr></table></figure>
</blockquote>
</li>
</ul>
<h4 id="17-2-更改模型路径"><a href="#17-2-更改模型路径" class="headerlink" title="17.2 更改模型路径"></a>17.2 更改模型路径</h4><ul>
<li>在博客根目录下新建目录 live2d_models</li>
<li>从目录node_modules中拷贝模型文件，放到live2d_models中</li>
</ul>
<h4 id="17-3-添加配置"><a href="#17-3-添加配置" class="headerlink" title="17.3 添加配置"></a>17.3 添加配置</h4><ul>
<li><p>说明文档：<a href="https://l2dwidget.js.org/docs/class/src/index.js~L2Dwidget.html#instance-method-init" target="_blank" rel="noopener">Live2D-widget.js.org</a></p>
</li>
<li><p>修改根目录下的<code>_config.yml</code>配置文件</p>
<blockquote>
<p>配置文件示例</p>
<figure class="highlight yml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># Live2D</span></span><br><span class="line"><span class="comment">## https://github.com/EYHN/hexo-helper-live2d</span></span><br><span class="line"><span class="comment">## https://l2dwidget.js.org/docs/class/src/index.js~L2Dwidget.html#instance-method-init</span></span><br><span class="line"><span class="attr">live2d:</span></span><br><span class="line">  <span class="attr">enable:</span> <span class="literal">true</span></span><br><span class="line">  <span class="comment">#enable: false</span></span><br><span class="line">  <span class="attr">scriptFrom:</span> <span class="string">local</span> <span class="comment"># 默认</span></span><br><span class="line">  <span class="attr">pluginRootPath:</span> <span class="string">live2dw/</span> <span class="comment"># 插件在站点上的根目录(相对路径)</span></span><br><span class="line">  <span class="attr">pluginJsPath:</span> <span class="string">lib/</span> <span class="comment"># 脚本文件相对与插件根目录路径</span></span><br><span class="line">  <span class="attr">pluginModelPath:</span> <span class="string">assets/</span> <span class="comment"># 模型文件相对与插件根目录路径</span></span><br><span class="line">  <span class="comment"># scriptFrom: jsdelivr # jsdelivr CDN</span></span><br><span class="line">  <span class="comment"># scriptFrom: unpkg # unpkg CDN</span></span><br><span class="line">  <span class="comment"># scriptFrom: https://cdn.jsdelivr.net/npm/live2d-widget@3.x/lib/L2Dwidget.min.js # 你的自定义 url</span></span><br><span class="line">  <span class="attr">tagMode:</span> <span class="literal">false</span> <span class="comment"># 标签模式, 是否仅替换 live2d tag标签而非插入到所有页面中</span></span><br><span class="line">  <span class="attr">debug:</span> <span class="literal">false</span> <span class="comment"># 调试, 是否在控制台输出日志</span></span><br><span class="line">  <span class="attr">model:</span></span><br><span class="line">    <span class="attr">use:</span>  <span class="comment"># 模型名</span></span><br><span class="line">    <span class="comment"># use: live2d-widget-model-wanko # npm-module package name</span></span><br><span class="line">    <span class="comment"># use: wanko # 博客根目录/live2d_models/ 下的目录名</span></span><br><span class="line">    <span class="comment"># use: ./wives/wanko # 相对于博客根目录的路径</span></span><br><span class="line">    <span class="comment"># use: https://cdn.jsdelivr.net/npm/live2d-widget-model-wanko@1.0.5/assets/wanko.model.json # 你的自定义 url</span></span><br><span class="line">  <span class="attr">display:</span></span><br><span class="line">    <span class="attr">position:</span> <span class="string">right</span></span><br><span class="line">    <span class="attr">width:</span> <span class="number">145</span></span><br><span class="line">    <span class="attr">height:</span> <span class="number">315</span></span><br><span class="line">  <span class="attr">mobile:</span></span><br><span class="line">    <span class="attr">show:</span> <span class="literal">true</span> <span class="comment"># 是否在移动设备上显示</span></span><br><span class="line">    <span class="attr">scale:</span> <span class="number">0.5</span> <span class="comment"># 移动设备上的缩放       </span></span><br><span class="line">  <span class="attr">react:</span></span><br><span class="line">    <span class="attr">opacityDefault:</span> <span class="number">0.7</span></span><br><span class="line">    <span class="attr">opacityOnHover:</span> <span class="number">0.8</span></span><br></pre></td></tr></table></figure>
</blockquote>
</li>
</ul>
<hr>
<h3 id="18-其他功能"><a href="#18-其他功能" class="headerlink" title="18. 其他功能"></a>18. 其他功能</h3><blockquote>
<p>后续逐步完善</p>
</blockquote>
<h4 id="18-1-图床"><a href="#18-1-图床" class="headerlink" title="18.1 图床"></a>18.1 图床</h4><p><a href="https://cloudy-liu.github.io/2018/04/07/Hexo_yilia_%E4%B8%BB%E9%A2%98%E4%B8%80%E6%8F%BD%E5%AD%90%E4%BC%98%E5%8C%96%E6%96%B9%E6%A1%88/" target="_blank" rel="noopener">七牛云图床</a></p>
<hr>
<h4 id="18-2-RSS"><a href="#18-2-RSS" class="headerlink" title="18.2 RSS"></a>18.2 RSS</h4><p><a href="https://blog.csdn.net/qq_40922859/article/details/97035497?utm_medium=distribute.pc_relevant.none-task-blog-BlogCommendFromMachineLearnPai2-2.channel_param&depth_1-utm_source=distribute.pc_relevant.none-task-blog-BlogCommendFromMachineLearnPai2-2.channel_param" target="_blank" rel="noopener">RSS</a></p>
<hr>
<h4 id="18-3-一言API个性签名自动刷新"><a href="#18-3-一言API个性签名自动刷新" class="headerlink" title="18.3 一言API个性签名自动刷新"></a>18.3 一言API个性签名自动刷新</h4><p><a href="https://blog.csdn.net/qq_40922859/article/details/97035497?utm_medium=distribute.pc_relevant.none-task-blog-BlogCommendFromMachineLearnPai2-2.channel_param&depth_1-utm_source=distribute.pc_relevant.none-task-blog-BlogCommendFromMachineLearnPai2-2.channel_param" target="_blank" rel="noopener">一言API个性签名自动刷新</a></p>
<hr>
<h4 id="18-4-Google收录"><a href="#18-4-Google收录" class="headerlink" title="18.4 Google收录"></a>18.4 Google收录</h4><p><a href="http://dongshuyan.com/2019/05/24/hexo%E5%8D%9A%E5%AE%A2%E6%B3%A8%E6%84%8F%E4%BA%8B%E9%A1%B9/#4-%E6%80%8E%E4%B9%88%E7%BD%AE%E9%A1%B6%E6%96%87%E7%AB%A0" target="_blank" rel="noopener">站点地图</a></p>
<hr>
<h4 id="18-5-Google广告投放"><a href="#18-5-Google广告投放" class="headerlink" title="18.5 Google广告投放"></a>18.5 Google广告投放</h4><p><a href="http://dongshuyan.com/2019/05/24/hexo%E5%8D%9A%E5%AE%A2%E6%B3%A8%E6%84%8F%E4%BA%8B%E9%A1%B9/#4-%E6%80%8E%E4%B9%88%E7%BD%AE%E9%A1%B6%E6%96%87%E7%AB%A0" target="_blank" rel="noopener">Google广告</a></p>
<hr>
<hr>
<h2 id="附录：参考资料"><a href="#附录：参考资料" class="headerlink" title="附录：参考资料"></a>附录：参考资料</h2><ul>
<li><p>参考资料：</p>
<blockquote>
<p><a href="https://cloudy-liu.github.io/2018/04/07/Hexo_yilia" target="_blank" rel="noopener">https://cloudy-liu.github.io/2018/04/07/Hexo_yilia</a></p>
<p><a href="https://blog.csdn.net/weixin_41287260/article/details/97693850" target="_blank" rel="noopener">https://blog.csdn.net/weixin_41287260/article/details/97693850</a></p>
<p><a href="https://blog.csdn.net/qq_37939980/article/details/104390332" target="_blank" rel="noopener">https://blog.csdn.net/qq_37939980/article/details/104390332</a></p>
<p><a href="http://dongshuyan.com/2019/05/24/hexo" target="_blank" rel="noopener">http://dongshuyan.com/2019/05/24/hexo</a></p>
<p><a href="https://github.com/dongshuyan/live2dDemo" target="_blank" rel="noopener">https://github.com/dongshuyan/live2dDemo</a></p>
</blockquote>
</li>
<li><p>视频教程</p>
<blockquote>
<p><a href="https://www.bilibili.com/video/BV1pt411K7o9?p=8" target="_blank" rel="noopener">https://www.bilibili.com/video/BV1pt411K7o9?p=8</a></p>
<p><a href="https://www.bilibili.com/video/BV1Yb411a7ty/?spm_id_from=333.788.videocard.2" target="_blank" rel="noopener">https://www.bilibili.com/video/BV1Yb411a7ty/?spm_id_from=333.788.videocard.2</a></p>
</blockquote>
</li>
</ul>

				
			
	  
	  
	  <!--    注释：
        <hr>
<ul>
<li>利用Hexo搭建的一个Yilia主题静态博客，并对博客进行了美化和功能扩展。</li>
<li>主要功能：文章加密、文章置顶、背景音乐、点击爱心、百度统计、不蒜子统计、SEO优化、百度收录、版权信息、Gitalk评论系统、Live2D</li>
</ul>
<p><img src="https://gitee.com/chthollists/PicRepo/raw/master/chtholly/Chtholly06.jpg" alt="Chtholly"></p>
<a id="more"></a>

<h1 id="Hexo博客搭建全家桶——不定期更新"><a href="#Hexo博客搭建全家桶——不定期更新" class="headerlink" title="Hexo博客搭建全家桶——不定期更新"></a>Hexo博客搭建全家桶——不定期更新</h1><hr>
<h2 id="一、博客分类及搭建工具"><a href="#一、博客分类及搭建工具" class="headerlink" title="一、博客分类及搭建工具"></a>一、博客分类及搭建工具</h2><blockquote>
<p>目前，主流的博客主要分静态博客和动态博客两类：</p>
<p>所谓动态，就是指有前端有后端，可以登录到后台进行管理。静态博客是纯前端的展示，没有后端。</p>
</blockquote>
<h3 id="1-动态博客-Dynamic-Blog"><a href="#1-动态博客-Dynamic-Blog" class="headerlink" title="1. 动态博客 Dynamic Blog"></a>1. 动态博客 Dynamic Blog</h3><ul>
<li><p>简书、CSDN、知乎、博客园、掘金等动态博客公共平台上搭建博客</p>
<ul>
<li>优点：简单</li>
<li>缺点：受到平台的限制</li>
</ul>
</li>
<li><p>WordPress框架</p>
<blockquote>
<p>使用WordPress等成熟框架搭建动态博客 + 服务器部署</p>
<p><a href="https://wordpress.org/" target="_blank" rel="noopener">WordPress官网</a></p>
</blockquote>
<ul>
<li><p>基于PHP</p>
</li>
<li><p>优点：相对简单</p>
</li>
<li><p>缺点：笨重</p>
</li>
</ul>
</li>
<li><p>前后端开发自行搭建</p>
<blockquote>
<p>使用 Java、PHP、Python等语言开发属于自己的动态博客 + 服务器部署</p>
</blockquote>
<ul>
<li>优点：功能强大</li>
<li>缺点：难度大</li>
</ul>
</li>
</ul>
<hr>
<h3 id="2-静态博客-Static-blog"><a href="#2-静态博客-Static-blog" class="headerlink" title="2. 静态博客 Static blog"></a>2. 静态博客 Static blog</h3><h4 id="2-1-静态博客框架"><a href="#2-1-静态博客框架" class="headerlink" title="2.1 静态博客框架"></a>2.1 静态博客框架</h4><blockquote>
<p>轻量级、快速</p>
</blockquote>
<ul>
<li><p>Hexo</p>
<ul>
<li><p><a href="https://hexo.io/" target="_blank" rel="noopener">Hexo官网</a></p>
</li>
<li><p>基于 JavaScript</p>
</li>
<li><p>Node.js</p>
</li>
</ul>
</li>
<li><p>Jekyllrb</p>
<ul>
<li><p><a href="https://jekyllrb.com/" target="_blank" rel="noopener">Jekyllrb官网</a></p>
</li>
<li><p>配置环境：Ruby、RubyGems、Node.js</p>
</li>
</ul>
</li>
<li><p>Hugo</p>
<ul>
<li><p><a href="https://www.gohugo.org/" target="_blank" rel="noopener">Hugo官网</a></p>
</li>
<li><p>基于Go</p>
</li>
</ul>
</li>
<li><p>VuePress</p>
<ul>
<li><p><a href="https://vuepress.vuejs.org/zh/guide/" target="_blank" rel="noopener">VuePres官网</a></p>
</li>
<li><p>基于Vue.js</p>
</li>
<li><p>配置环境： <a href="http://vuejs.org/" target="_blank" rel="noopener">Vue</a>、<a href="https://github.com/vuejs/vue-router" target="_blank" rel="noopener">Vue Router</a> 、<a href="http://webpack.js.org/" target="_blank" rel="noopener">webpack</a></p>
</li>
</ul>
</li>
<li><p>Solo</p>
<ul>
<li><a href="https://solo.b3log.org/" target="_blank" rel="noopener">Solo官网</a></li>
</ul>
</li>
<li><p>基于Java</p>
<ul>
<li>配置环境：JDK</li>
</ul>
</li>
</ul>
<h4 id="2-2-服务器"><a href="#2-2-服务器" class="headerlink" title="2.2 服务器"></a>2.2 服务器</h4><ul>
<li><p>托管在GitHub、Coding、Gitee码云等公共平台</p>
<ul>
<li>优点：免费、简便</li>
<li>缺点：访问速度慢、Github限制百度爬虫，不方便实现SEO优化</li>
</ul>
</li>
<li><p>自己搭建云服务器</p>
<blockquote>
<p><a href="https://mp.weixin.qq.com/s?sn=8009155566a3f5cd3e46b4052a047f73&idx=1&mid=2247483706&lang=zh_CN&__biz=MzUzMTA2Njk3Mw%3D%3D&chksm=fa497808cd3ef11ea8ba66a60bb131716b8278fcd1bf3105cf67c988b367d110089af453736c&token=55710950&bili_only=0#rd" target="_blank" rel="noopener">Hexo+阿里云教程</a></p>
</blockquote>
<ul>
<li>优点：访问速度快、独立域名、自主可控</li>
<li>缺点：域名和云服务器均付费</li>
</ul>
</li>
</ul>
<hr>
<hr>
<h2 id="二、Git与Github"><a href="#二、Git与Github" class="headerlink" title="二、Git与Github"></a>二、Git与Github</h2><ul>
<li><p>教程</p>
<blockquote>
<p><a href="https://www.liaoxuefeng.com/" target="_blank" rel="noopener">Git教程——廖雪峰</a></p>
<p><a href="https://blog.csdn.net/qq_39387475/article/details/84996173" target="_blank" rel="noopener">Git教程</a></p>
</blockquote>
</li>
</ul>
<h3 id="1-Git安装与配置"><a href="#1-Git安装与配置" class="headerlink" title="1. Git安装与配置"></a>1. Git安装与配置</h3><ul>
<li><p>Git 分布式版本控制系统原理</p>
<blockquote>
<p>版本控制系统，其实只能跟踪文本文件的改动，比如TXT文件，网页，所有的程序代码等等，无法追踪图片、音频、视频等的改动。</p>
</blockquote>
<ul>
<li><p>工作区(Working Directory)：就是电脑本地看到的目录。</p>
</li>
<li><p>暂存区：英文叫stage, 或index。</p>
<blockquote>
<p>一般存放在 “.git目录下” 下的index文件（.git/index）中，所以我们把暂存区有时也叫作索引（index）。</p>
</blockquote>
</li>
<li><p>版本库(Repository)：工作区有一个隐藏目录.git，这个不算工作区，而是Git的版本库。</p>
</li>
</ul>
</li>
<li><p>安装包下载</p>
<blockquote>
<p><a href="https://git-scm.com/downloads" target="_blank" rel="noopener">Git官网</a></p>
</blockquote>
</li>
<li><p>在Git bash中配置本地用户名及邮箱</p>
<blockquote>
<p>如果用了 –global 选项，那么更改的配置文件就是位于你用户主目录下的那个，以后你所有的项目都会默认使用这里配置的用户信息。</p>
<p>如果要在某个特定的项目中使用其他名字或者电邮，只要去掉 –global 选项重新配置即可，新的设定保存在当前项目的 .git/config 文件里。</p>
</blockquote>
<blockquote>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># 查看配置</span></span><br><span class="line">git config --list ：</span><br><span class="line"><span class="comment"># 设置全局用户名</span></span><br><span class="line">git config --global user.name <span class="string">"your name"</span>   </span><br><span class="line"><span class="comment"># 设置全局邮箱</span></span><br><span class="line">git config --global user.email <span class="string">"your email"</span> </span><br><span class="line"><span class="comment"># 查看本目录下仓库的用户名</span></span><br><span class="line"> git config user.name</span><br><span class="line"><span class="comment"># 修改本目录下仓库的用户名</span></span><br><span class="line">git config user.name <span class="string">"用户名"</span></span><br><span class="line"><span class="comment"># 查看本目录下仓库的邮箱 ；</span></span><br><span class="line">git config user.email </span><br><span class="line"><span class="comment"># 修改本目录下仓库的邮箱 ； </span></span><br><span class="line">git config user.email <span class="string">"邮箱"</span>   </span><br></pre></td></tr></table></figure>
</blockquote>
</li>
<li><p>编辑、删除全局配置</p>
<blockquote>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># 删除全局配置，终端执行命令</span></span><br><span class="line">git config --global --<span class="built_in">unset</span> user.name</span><br><span class="line"></span><br><span class="line"><span class="comment"># 编辑配置文件</span></span><br><span class="line">git config --global --edit</span><br></pre></td></tr></table></figure>
</blockquote>
</li>
</ul>
<hr>
<h3 id="2-Git创建仓库及管理"><a href="#2-Git创建仓库及管理" class="headerlink" title="2. Git创建仓库及管理"></a>2. Git创建仓库及管理</h3><blockquote>
<p>所有命令均在Git bash 命令行中完成 $</p>
</blockquote>
<ul>
<li><p>创建仓库</p>
<ul>
<li><p>在路径下创建空目录</p>
<blockquote>
<p>可以修改新建路径，默认C/Users/you</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">mkdir newrepo</span><br><span class="line"><span class="built_in">cd</span> newrepo</span><br></pre></td></tr></table></figure>
</blockquote>
</li>
<li><p>在新建的目录下完成初始化</p>
<blockquote>
<p>在目录下会出现一个名为 .git 的目录，所有 Git 需要的数据和资源都存放在这个目录中</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">git init</span><br><span class="line"><span class="comment"># 或者直接把创建目录和初始化一步完成</span></span><br><span class="line">git init newrepo</span><br></pre></td></tr></table></figure>
</blockquote>
</li>
</ul>
</li>
<li><p>本地仓库管理(文件版本管理)</p>
<blockquote>
<p>所有要管理的文件必须放在仓库中</p>
</blockquote>
<ul>
<li><p>添加文件</p>
<blockquote>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># 把文件从工作区Working Directory添加到缓存index</span></span><br><span class="line"><span class="comment">#  git add 文件名</span></span><br><span class="line"><span class="comment"># 文件名有空格时，需要写在引号中</span></span><br><span class="line">git add CodeAlgorithm.md</span><br><span class="line"><span class="comment"># 把全部文件添加到缓存区</span></span><br><span class="line">git add --all</span><br><span class="line"></span><br><span class="line"><span class="comment"># 把文件从缓存区index提交到Git仓库中master</span></span><br><span class="line"><span class="comment"># 可以一次提交多个文件，即多次add后再commit</span></span><br><span class="line"><span class="comment"># git commit -m "提交说明"</span></span><br><span class="line">git commit -m <span class="string">"test"</span></span><br><span class="line"><span class="comment"># 跳过添加成缓存步骤，直接添加到仓库中  -a</span></span><br><span class="line">git commit -a</span><br></pre></td></tr></table></figure></blockquote>
</li>
</ul>
</li>
<li><p>查看改动</p>
<blockquote>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># 查看缓存区index文件</span></span><br><span class="line"><span class="comment"># A 表示缓存区</span></span><br><span class="line"><span class="comment"># AM 表示该文件添加进缓存区后被改动过，此时需要再次add</span></span><br><span class="line"><span class="comment"># ??表示不再缓存区</span></span><br><span class="line">git status -s</span><br><span class="line"></span><br><span class="line"><span class="comment"># 查看具体改动</span></span><br><span class="line"><span class="comment"># 查看执行 git status 的结果的详细信息</span></span><br><span class="line"><span class="comment"># 尚未缓存的改动</span></span><br><span class="line">git diff</span><br><span class="line"><span class="comment"># 查看已缓存的改动</span></span><br><span class="line">git diff --cached</span><br><span class="line"><span class="comment"># 查看已缓存的与未缓存的所有改动</span></span><br><span class="line">git diff HEAD</span><br><span class="line"><span class="comment"># 显示摘要而非整个 diff</span></span><br><span class="line">git diff --<span class="built_in">stat</span></span><br></pre></td></tr></table></figure>
</blockquote>
<ul>
<li><p>查看历史记录</p>
<blockquote>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># 详细历史日志</span></span><br><span class="line">git <span class="built_in">log</span></span><br><span class="line"><span class="comment"># 单行简易输出</span></span><br><span class="line">git <span class="built_in">log</span> --pretty=oneline</span><br></pre></td></tr></table></figure></blockquote>
</li>
<li><p>文件版本回溯</p>
</li>
</ul>
<blockquote>
<p>在Git中，用<code>HEAD</code>表示当前版本，上一个版本就是<code>HEAD^</code>，上上一个版本就是<code>HEAD^^</code>，往上100个版本简写成<code>HEAD~100</code>。</p>
<p>Git在内部有个指向当前版本的<code>HEAD</code>指针，回溯版本实际上是改变指针的对象。</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># 版本回溯 --旧版</span></span><br><span class="line"><span class="comment"># git reset 版本(HEAD表示法、或者log下显示的版本号---输入前几位即可自动匹配)</span></span><br><span class="line">git reset --hard HEAD^</span><br><span class="line">git reset --hard xxxxxx</span><br><span class="line"></span><br><span class="line"><span class="comment"># 版本回溯 --新版</span></span><br><span class="line"><span class="comment"># 从master恢复暂存区</span></span><br><span class="line">git resotre --worktree File</span><br><span class="line"><span class="comment"># 从暂存区恢复工作区</span></span><br><span class="line">git restore --staged </span><br><span class="line"><span class="comment"># 从master同时恢复工作区和暂存区</span></span><br><span class="line">git restore --<span class="built_in">source</span>=HEAD --staged --worktree 文件名</span><br><span class="line"></span><br><span class="line"><span class="comment"># 查看当前记录、版本号</span></span><br><span class="line">git <span class="built_in">log</span></span><br><span class="line"><span class="comment"># 查看之前指令的相关记录---可以看到版本号</span></span><br><span class="line">git reflog</span><br></pre></td></tr></table></figure>
</blockquote>
<ul>
<li><p>文件撤销修改</p>
<blockquote>
<p>把文件在工作区的修改全部撤销，这里有两种情况：</p>
</blockquote>
<ul>
<li>一种是文件自修改后还没有被放到暂存区，现在，撤销修改就回到和版本库一模一样的状态；</li>
</ul>
</li>
</ul>
</li>
<li><p>一种是文件已经添加到暂存区后，又作了修改，现在，撤销修改就回到添加到暂存区后的状态。</p>
<ul>
<li><p>总之，就是让这个文件回到最近一次<code>git commit</code>或<code>git add</code>时的状态。</p>
<blockquote>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># 旧版</span></span><br><span class="line">git checkout -- 文件名</span><br><span class="line"></span><br><span class="line"><span class="comment"># 新版</span></span><br><span class="line">git restore 文件名</span><br></pre></td></tr></table></figure>
</blockquote>
<ul>
<li>文件删除与恢复</li>
</ul>
<blockquote>
<p>工作区的文件被删除后，在删除版本库中的文件</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">git rm  文件名</span><br><span class="line">git commit -m <span class="string">"说明remove "</span></span><br></pre></td></tr></table></figure>

<p>工作区的文佳误删后，通过版本库恢复文件</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">rm <span class="string">'文件名'</span></span><br><span class="line">git restore 文件名</span><br></pre></td></tr></table></figure>
</blockquote>
</li>
</ul>
<ul>
<li><p>创建、切换、删除分支</p>
<blockquote>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># 默认主分支master</span></span><br><span class="line"><span class="comment"># 创建一个叫做"feature_x"的分支，并切换过去：-b</span></span><br><span class="line">git checkout -b feature_x</span><br><span class="line"></span><br><span class="line"><span class="comment"># 切换回主分支：</span></span><br><span class="line">git checkout master</span><br><span class="line"></span><br><span class="line"><span class="comment"># 再把新建的分支删掉：-d</span></span><br><span class="line">git branch -d feature_x</span><br><span class="line"></span><br><span class="line"><span class="comment"># 除非你将分支推送到远端仓库，不然该分支就是 不为他人所见的：</span></span><br><span class="line">git push origin &lt;branch&gt;</span><br></pre></td></tr></table></figure>
</blockquote>
</li>
</ul>
</li>
</ul>
<hr>
<h3 id="3-Git远程仓库"><a href="#3-Git远程仓库" class="headerlink" title="3. Git远程仓库"></a>3. Git远程仓库</h3><blockquote>
<p>将文件push到远程仓库的流程</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># 在目标路径下Git bash</span></span><br><span class="line">git init</span><br><span class="line">git add -all</span><br><span class="line">git commit -m <span class="string">'readme'</span></span><br><span class="line">git remote add origin git@server-name:path/repo-name.git</span><br><span class="line"><span class="comment"># git remote -v</span></span><br><span class="line">git push -u origin master</span><br></pre></td></tr></table></figure>
</blockquote>
<ul>
<li><p>创建SSH Key</p>
<blockquote>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># 会在用户主目录下，生成.ssh目录，里面有id_rsa私钥、id_ras.pub公钥文件</span></span><br><span class="line">ssh-keygen -t rsa -C <span class="string">"youremail@example.com"</span></span><br></pre></td></tr></table></figure>

<p><a href="mailto:youremail@example.com">youremail@example.com</a>使用注册Github、Gitee时的邮箱</p>
</blockquote>
</li>
<li><p>登陆Github，Add SSH Key</p>
<blockquote>
<p>打开“Account settings”，“SSH Keys”页面，点“Add SSH Key”，填上任意Title，在Key文本框里粘贴<code>id_rsa.pub</code>文件的内容</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># 验证是否成功</span></span><br><span class="line">ssh -T git@github.com</span><br></pre></td></tr></table></figure>
</blockquote>
</li>
<li><p>在Github上创建新的库并关联remote，将本地库推送到远程库push</p>
<blockquote>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># 关联远程库</span></span><br><span class="line">git remote add origin git@server-name:path/repo-name.git</span><br><span class="line">git remote add origin(远程库名，默认origin) git@github.com:Github用户名/远程库名</span><br><span class="line">git remote add origin git@github.com:Amaduess/newrepo.git</span><br><span class="line"><span class="comment"># 删除已有的关联origin</span></span><br><span class="line">git remote rm origin</span><br><span class="line"><span class="comment"># 查看现有的关联</span></span><br><span class="line"> git remote -v</span><br><span class="line"> </span><br><span class="line"><span class="comment"># 推送push</span></span><br><span class="line"><span class="comment"># 第一次push -u 将本地master与远程master关联</span></span><br><span class="line">git push -u origin master</span><br><span class="line"><span class="comment"># 之后push</span></span><br><span class="line">git push origin master</span><br></pre></td></tr></table></figure>
</blockquote>
</li>
<li><p>从远程库克隆到本地库</p>
<blockquote>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">git <span class="built_in">clone</span> git@server-name:path/repo-name.git</span><br><span class="line">git <span class="built_in">clone</span> git@github.com:Github用户名/远程库名</span><br></pre></td></tr></table></figure>
</blockquote>
</li>
<li><p>克隆后可以更新本地库pull</p>
<blockquote>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># 在当前工作目录中 获取（fetch） 并 合并（merge） 远端的改动</span></span><br><span class="line">git pull</span><br></pre></td></tr></table></figure>
</blockquote>
</li>
<li><p>其他</p>
<blockquote>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># 内建的图形化 git：</span></span><br><span class="line">gitk</span><br><span class="line"></span><br><span class="line"><span class="comment"># 创建标签</span></span><br><span class="line">git tag 1.0.0  ID(前十位字符)</span><br><span class="line"></span><br><span class="line"><span class="comment"># 彩色的 git 输出：</span></span><br><span class="line">git config color.ui <span class="literal">true</span></span><br><span class="line"></span><br><span class="line"><span class="comment"># 显示历史记录时，每个提交的信息只显示一行：</span></span><br><span class="line">git config format.pretty oneline</span><br><span class="line"></span><br><span class="line"><span class="comment"># 交互式添加文件到暂存区：</span></span><br><span class="line">git add -i</span><br></pre></td></tr></table></figure>
</blockquote>
</li>
</ul>
<hr>
<hr>
<h2 id="三、利用Hexo搭建博客"><a href="#三、利用Hexo搭建博客" class="headerlink" title="三、利用Hexo搭建博客"></a>三、利用Hexo搭建博客</h2><blockquote>
<p><a href="http://dongshuyan.com/2016/04/07/%E6%80%8E%E4%B9%88%E5%86%99%E5%8D%9A%E5%AE%A2/" target="_blank" rel="noopener">Hexo博客搭建教程</a></p>
</blockquote>
<h3 id="1-准备工作-Nodejs-amp-Git"><a href="#1-准备工作-Nodejs-amp-Git" class="headerlink" title="1. 准备工作 Nodejs &amp; Git"></a>1. 准备工作 Nodejs &amp; Git</h3><ul>
<li><p>配置Node.js</p>
<blockquote>
<p><a href="https://nodejs.org/en/" target="_blank" rel="noopener">Nodejs官网</a></p>
</blockquote>
</li>
<li><p>配置Git</p>
<blockquote>
<p><a href="https://git-scm.com/downloads" target="_blank" rel="noopener">Git官网</a></p>
</blockquote>
</li>
<li><p>检测安装结果</p>
<blockquote>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># 查看node、npm、git版本</span></span><br><span class="line">node -v</span><br><span class="line">npm -v</span><br><span class="line">git --version</span><br></pre></td></tr></table></figure>
</blockquote>
</li>
<li><p>通过npm安装淘宝镜像源cnmp</p>
<blockquote>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># 安装cnpm</span></span><br><span class="line">npm install -g cnpm --registry=https://registry.npm.taobao.org</span><br><span class="line"></span><br><span class="line"><span class="comment"># 查看cnpm版本</span></span><br><span class="line">cnpm --version</span><br></pre></td></tr></table></figure>
</blockquote>
</li>
</ul>
<hr>
<h3 id="2-Hexo安装及配置"><a href="#2-Hexo安装及配置" class="headerlink" title="2. Hexo安装及配置"></a>2. Hexo安装及配置</h3><ul>
<li><p>安装Hexo</p>
<blockquote>
<p><a href="https://hexo.io/" target="_blank" rel="noopener">Hexo官网</a></p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># 安装</span></span><br><span class="line">cnpm install -g hexo-cli</span><br><span class="line"><span class="comment"># 查看版本</span></span><br><span class="line">hexo -v</span><br></pre></td></tr></table></figure>
</blockquote>
</li>
<li><p>Hexo初始化</p>
<blockquote>
<p>创建目录，并在此目录下进行后续操作</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># 创建目录</span></span><br><span class="line">mkdir HexoBlog</span><br><span class="line"><span class="built_in">cd</span> HexoBlog</span><br><span class="line"></span><br><span class="line"><span class="comment"># 初始化hexo</span></span><br><span class="line">hexo init</span><br><span class="line"></span><br><span class="line"><span class="comment"># 查看初始化的文件</span></span><br><span class="line">ls -al</span><br><span class="line"></span><br><span class="line"><span class="comment"># ------------------或者--------------------------</span></span><br><span class="line">hexo init HexoBlog</span><br></pre></td></tr></table></figure>
</blockquote>
</li>
<li><p>Hexo启动</p>
<blockquote>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># 启动Hexo 搭建初始博客</span></span><br><span class="line">hexo s</span><br><span class="line"><span class="comment"># 或者</span></span><br><span class="line">hexo server</span><br></pre></td></tr></table></figure>

<p> 此时博客已经初步搭建完成，本地访问地址：<a href="http://localhost:4000" target="_blank" rel="noopener">http://localhost:4000</a></p>
<p>当Git bash上停止服务器后，无法访问</p>
</blockquote>
</li>
<li><p>Hexo基本命令</p>
<blockquote>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br></pre></td><td class="code"><pre><span class="line">npm update hexo -g  <span class="comment">#升级 </span></span><br><span class="line">hexo init &lt;folder&gt;  <span class="comment">#执行init命令初始化hexo到你指定的目录</span></span><br><span class="line">hexo n <span class="string">"我的博客"</span> == hexo new <span class="string">"我的博客"</span> <span class="comment">#新建文章</span></span><br><span class="line">hexo generate       <span class="comment">#自动根据当前目录下文件,生成静态网页 hexo g</span></span><br><span class="line">hexo server         <span class="comment">#运行本地服务 hexo s</span></span><br><span class="line">hexo clean          <span class="comment">#清理</span></span><br><span class="line">hexo deploy         <span class="comment">#部署 hexo d</span></span><br><span class="line"></span><br><span class="line">hexo server         <span class="comment">#Hexo会监视文件变动并自动更新，无须重启服务器</span></span><br><span class="line">hexo server -s      <span class="comment">#静态模式</span></span><br><span class="line">hexo server -p 5000 <span class="comment">#更改端口</span></span><br><span class="line">hexo server -i 192.168.1.1 <span class="comment">#自定义 IP</span></span><br></pre></td></tr></table></figure>
</blockquote>
</li>
</ul>
<hr>
<h3 id="3-博客部署到远端服务器"><a href="#3-博客部署到远端服务器" class="headerlink" title="3. 博客部署到远端服务器"></a>3. 博客部署到远端服务器</h3><ul>
<li><p>使用Github作为远端服务器</p>
<blockquote>
<p>在Github上新建库，库名为：用户名.github.io</p>
<p>ssh：<a href="mailto:git@github.com">git@github.com</a>:Amaduess/Amaduess.github.io.git</p>
</blockquote>
</li>
<li><p>利用cnpm安装一个hexo-deployer-git插件</p>
<blockquote>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># 安装插件</span></span><br><span class="line">cnpm install --save hexo-deployer-git</span><br><span class="line"></span><br><span class="line"><span class="comment"># 打开_config.yml文件，修改内容</span></span><br><span class="line">vim _config.yml</span><br><span class="line"><span class="comment"># 原内容</span></span><br><span class="line">deploy:</span><br><span class="line">	<span class="built_in">type</span> : <span class="string">' '</span></span><br><span class="line"><span class="comment"># 改为</span></span><br><span class="line">deploy:</span><br><span class="line">	<span class="built_in">type</span> : git</span><br><span class="line">	<span class="comment"># 服务器地址(仓库地址)</span></span><br><span class="line">	repo : git@github.com:Amaduess/Amaduess.github.io.git </span><br><span class="line">	<span class="comment"># 分支，设置为管理员</span></span><br><span class="line">	branch : master</span><br></pre></td></tr></table></figure>
</blockquote>
</li>
<li><p>将博客部署到Github上</p>
<blockquote>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">hexo d</span><br><span class="line">hexo deploy</span><br></pre></td></tr></table></figure>
</blockquote>
</li>
</ul>
<hr>
<hr>
<h2 id="四、博客设置美化"><a href="#四、博客设置美化" class="headerlink" title="四、博客设置美化"></a>四、博客设置美化</h2><ul>
<li>各功能教程超链接汇总<ul>
<li><a href="http://dongshuyan.com/2016/04/07/%E6%80%8E%E4%B9%88%E5%86%99%E5%8D%9A%E5%AE%A2/" target="_blank" rel="noopener">MarkDown语法简介</a></li>
<li><a href="[http://dongshuyan.com/2016/04/07/%E6%80%8E%E4%B9%88%E5%86%99%E5%8D%9A%E5%AE%A2/](http://dongshuyan.com/2016/04/07/怎么写博客/)">主题更换</a></li>
<li><a href="https://cloudy-liu.github.io/2018/04/07/Hexo_yilia_%E4%B8%BB%E9%A2%98%E4%B8%80%E6%8F%BD%E5%AD%90%E4%BC%98%E5%8C%96%E6%96%B9%E6%A1%88/#%E7%99%BE%E5%BA%A6-Google%E7%BB%9F%E8%AE%A1-SEO" target="_blank" rel="noopener">配置图片和链接</a></li>
<li><a href="https://blog.csdn.net/qq_37939980/article/details/104390332" target="_blank" rel="noopener">文章摘要、目录、归档、字体</a></li>
<li><a href="https://blog.csdn.net/qq_40922859/article/details/97035497?utm_medium=distribute.pc_relevant.none-task-blog-BlogCommendFromMachineLearnPai2-2.channel_param&depth_1-utm_source=distribute.pc_relevant.none-task-blog-BlogCommendFromMachineLearnPai2-2.channel_param" target="_blank" rel="noopener">美化目录</a></li>
<li><a href="https://blog.csdn.net/qq_37939980/article/details/104390332" target="_blank" rel="noopener">文章总数统计、主页美化</a></li>
</ul>
</li>
</ul>
<h3 id="1-主题更换-：Yilia"><a href="#1-主题更换-：Yilia" class="headerlink" title="1. 主题更换 ：Yilia"></a>1. 主题更换 ：Yilia</h3><ul>
<li><p>下载开源的主题，存放在HexoBlog/theme目录下</p>
<blockquote>
<p>选择Github上很多人star的[Yilia主题](<a href="https://github.com/litten/hexo-theme-yilia.git" target="_blank" rel="noopener">https://github.com/litten/hexo-theme-yilia.git</a> themes/yilia)</p>
<p>此外，还有<a href="https://zhousiwei.gitee.io/2019/07/25/hexo%E4%B8%BB%E9%A2%98%E4%B9%8Bhexo-theme-yilia-plus/" target="_blank" rel="noopener">Yilia-plus主题</a>、Next主题等</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># 在HexoBlog目录下Git bash</span></span><br><span class="line">git <span class="built_in">clone</span> https://github.com/litten/hexo-theme-yilia.git themes/yilia</span><br></pre></td></tr></table></figure>
</blockquote>
</li>
<li><p>修改_config.yml文件</p>
<blockquote>
<figure class="highlight yml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line"><span class="attr">theme :</span> <span class="string">landscape</span></span><br><span class="line"><span class="comment"># 改为</span></span><br><span class="line"><span class="attr">theme :</span> <span class="string">yilia</span></span><br></pre></td></tr></table></figure>
</blockquote>
</li>
<li><p>清理hexo并重新生成页面，部署到Github上</p>
<blockquote>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># 清理</span></span><br><span class="line">hexo clean</span><br><span class="line"></span><br><span class="line"><span class="comment"># 生成</span></span><br><span class="line">hexo g</span><br><span class="line">hexo generate</span><br><span class="line"></span><br><span class="line"><span class="comment"># 本地预览</span></span><br><span class="line">hexo s</span><br><span class="line"></span><br><span class="line"><span class="comment"># 部署</span></span><br><span class="line">hexo d</span><br></pre></td></tr></table></figure>
</blockquote>
</li>
</ul>
<hr>
<h3 id="2-配置图片资源和链接资源"><a href="#2-配置图片资源和链接资源" class="headerlink" title="2. 配置图片资源和链接资源"></a>2. 配置图片资源和链接资源</h3><blockquote>
<p>添加WeChat、Email、Github等作为博主的联系方式</p>
<p>添加个人头像、网页favicon</p>
</blockquote>
<ul>
<li><p>添加图片资源文件夹</p>
<blockquote>
<p>路径为 <code>themes/yilia/source/</code>下，可添加一个 <code>assets</code> 文件夹，里面存放图片资源即可</p>
</blockquote>
</li>
<li><p>配置文件中直接引用</p>
<blockquote>
<p>路径为 <code>themes/yilia/_config.yml</code></p>
<figure class="highlight yml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># 微信二维码图片</span></span><br><span class="line"><span class="attr">weixin:</span>  <span class="string">/assets/wechat.jpg</span></span><br><span class="line"><span class="comment"># 头像图片</span></span><br><span class="line"><span class="attr">avatar:</span>  <span class="string">/assets/avatar.jpg</span></span><br><span class="line"><span class="comment"># 网页图标</span></span><br><span class="line"><span class="attr">favicon:</span>  <span class="string">/assets/favicon.png</span></span><br></pre></td></tr></table></figure>
</blockquote>
</li>
<li><p>链接资源——配置文件中直接引用链接地址</p>
<blockquote>
<p>路径为 <code>themes/yilia/_config.yml</code></p>
<p>如：Github、Facebook、Twitter、Bilibili等</p>
<figure class="highlight yml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line"><span class="attr">github:</span> <span class="string">"https://github.com/Chthollists"</span></span><br><span class="line"><span class="attr">bilibili:</span> <span class="string">"https://space.bilibili.com/2030799"</span></span><br></pre></td></tr></table></figure>
</blockquote>
</li>
<li><p>注意：_config.yml的语句对空格、缩进要求严格</p>
</li>
</ul>
<hr>
<h3 id="3-博客文章美化设置"><a href="#3-博客文章美化设置" class="headerlink" title="3. 博客文章美化设置"></a>3. 博客文章美化设置</h3><h4 id="3-1-显示文章摘要"><a href="#3-1-显示文章摘要" class="headerlink" title="3.1 显示文章摘要"></a>3.1 显示文章摘要</h4><ul>
<li><p>在你MD 格式文章正文,一般在标题后插入 <code>&lt;!-- more --&gt;</code></p>
<blockquote>
<p>同时注释掉 <code>themes/yilia/_config.yml</code>内的</p>
<figure class="highlight yml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># 文章太长，截断按钮文字</span></span><br><span class="line"><span class="comment"># excerpt_link: more</span></span><br></pre></td></tr></table></figure>
</blockquote>
</li>
</ul>
<h4 id="3-2-显示文章目录TOC"><a href="#3-2-显示文章目录TOC" class="headerlink" title="3.2 显示文章目录TOC"></a>3.2 显示文章目录TOC</h4><ul>
<li><p>TOC(table of content) 在 <code>themes/yilia/_config.yml</code>中进行配置</p>
<blockquote>
<figure class="highlight yml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># 目录设定：</span></span><br><span class="line"><span class="comment"># 0-不显示目录； </span></span><br><span class="line"><span class="comment"># 1-文章对应的md文件里有toc:true属性，才有目录； </span></span><br><span class="line"><span class="comment"># 2-所有文章均显示目录</span></span><br><span class="line"><span class="attr">toc:</span> <span class="number">2</span></span><br></pre></td></tr></table></figure>
</blockquote>
</li>
</ul>
<h4 id="3-3-增加归档菜单"><a href="#3-3-增加归档菜单" class="headerlink" title="3.3 增加归档菜单"></a>3.3 增加归档菜单</h4><ul>
<li><p>修改 <code>themes/yilia/_config.yml</code>配置</p>
<blockquote>
<figure class="highlight yml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line"><span class="attr">menu:</span></span><br><span class="line">    <span class="string">主页:</span>  <span class="string">/</span></span><br><span class="line">    <span class="string">归档:</span>  <span class="string">/archives/index.html</span></span><br></pre></td></tr></table></figure>
</blockquote>
</li>
</ul>
<h4 id="3-4-美化目录"><a href="#3-4-美化目录" class="headerlink" title="3.4 美化目录"></a>3.4 美化目录</h4><blockquote>
<p>通过toc = 2生成的蓝底目录不够美观，通过修改css和ejs文件来自制滑动白色目录</p>
<p>注意：此时yilia主题的原目录无法显示。</p>
</blockquote>
<ul>
<li><p>修改css文件</p>
<blockquote>
<p>themes\yilia\source\路径下找到<code>main.xxxxx.css</code>，在最后添加代码</p>
<figure class="highlight css"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br><span class="line">44</span><br><span class="line">45</span><br><span class="line">46</span><br><span class="line">47</span><br><span class="line">48</span><br><span class="line">49</span><br><span class="line">50</span><br><span class="line">51</span><br><span class="line">52</span><br><span class="line">53</span><br><span class="line">54</span><br><span class="line">55</span><br><span class="line">56</span><br><span class="line">57</span><br><span class="line">58</span><br><span class="line">59</span><br><span class="line">60</span><br><span class="line">61</span><br><span class="line">62</span><br><span class="line">63</span><br><span class="line">64</span><br><span class="line">65</span><br><span class="line">66</span><br><span class="line">67</span><br><span class="line">68</span><br><span class="line">69</span><br><span class="line">70</span><br><span class="line">71</span><br><span class="line">72</span><br><span class="line">73</span><br><span class="line">74</span><br><span class="line">75</span><br><span class="line">76</span><br><span class="line">77</span><br><span class="line">78</span><br><span class="line">79</span><br><span class="line">80</span><br><span class="line">81</span><br><span class="line">82</span><br><span class="line">83</span><br><span class="line">84</span><br><span class="line">85</span><br><span class="line">86</span><br><span class="line">87</span><br><span class="line">88</span><br><span class="line">89</span><br><span class="line">90</span><br><span class="line">91</span><br><span class="line">92</span><br><span class="line">93</span><br><span class="line">94</span><br><span class="line">95</span><br><span class="line">96</span><br><span class="line">97</span><br><span class="line">98</span><br><span class="line">99</span><br><span class="line">100</span><br><span class="line">101</span><br><span class="line">102</span><br><span class="line">103</span><br><span class="line">104</span><br><span class="line">105</span><br><span class="line">106</span><br><span class="line">107</span><br><span class="line">108</span><br><span class="line">109</span><br><span class="line">110</span><br><span class="line">111</span><br><span class="line">112</span><br><span class="line">113</span><br><span class="line">114</span><br><span class="line">115</span><br><span class="line">116</span><br><span class="line">117</span><br><span class="line">118</span><br><span class="line">119</span><br><span class="line">120</span><br><span class="line">121</span><br><span class="line">122</span><br><span class="line">123</span><br><span class="line">124</span><br><span class="line">125</span><br><span class="line">126</span><br><span class="line">127</span><br><span class="line">128</span><br><span class="line">129</span><br><span class="line">130</span><br><span class="line">131</span><br><span class="line">132</span><br><span class="line">133</span><br><span class="line">134</span><br><span class="line">135</span><br><span class="line">136</span><br><span class="line">137</span><br><span class="line">138</span><br><span class="line">139</span><br><span class="line">140</span><br><span class="line">141</span><br><span class="line">142</span><br><span class="line">143</span><br><span class="line">144</span><br><span class="line">145</span><br><span class="line">146</span><br><span class="line">147</span><br><span class="line">148</span><br><span class="line">149</span><br><span class="line">150</span><br><span class="line">151</span><br><span class="line">152</span><br><span class="line">153</span><br><span class="line">154</span><br><span class="line">155</span><br><span class="line">156</span><br><span class="line">157</span><br><span class="line">158</span><br><span class="line">159</span><br><span class="line">160</span><br><span class="line">161</span><br><span class="line">162</span><br><span class="line">163</span><br><span class="line">164</span><br><span class="line">165</span><br><span class="line">166</span><br><span class="line">167</span><br><span class="line">168</span><br><span class="line">169</span><br><span class="line">170</span><br><span class="line">171</span><br><span class="line">172</span><br><span class="line">173</span><br><span class="line">174</span><br><span class="line">175</span><br><span class="line">176</span><br><span class="line">177</span><br><span class="line">178</span><br><span class="line">179</span><br><span class="line">180</span><br><span class="line">181</span><br><span class="line">182</span><br><span class="line">183</span><br><span class="line">184</span><br><span class="line">185</span><br><span class="line">186</span><br><span class="line">187</span><br><span class="line">188</span><br><span class="line">189</span><br><span class="line">190</span><br><span class="line">191</span><br><span class="line">192</span><br><span class="line">193</span><br><span class="line">194</span><br><span class="line">195</span><br><span class="line">196</span><br><span class="line">197</span><br><span class="line">198</span><br><span class="line">199</span><br><span class="line">200</span><br><span class="line">201</span><br><span class="line">202</span><br><span class="line">203</span><br><span class="line">204</span><br><span class="line">205</span><br><span class="line">206</span><br></pre></td><td class="code"><pre><span class="line"><span class="selector-id">#container</span> <span class="selector-class">.show-toc-btn</span>,</span><br><span class="line"><span class="selector-id">#container</span> <span class="selector-class">.toc-article</span>&#123;<span class="attribute">display</span>:block&#125;</span><br><span class="line"></span><br><span class="line"><span class="selector-class">.toc-article</span>&#123;</span><br><span class="line"> <span class="attribute">z-index</span>:<span class="number">100</span>;</span><br><span class="line"> <span class="attribute">background</span>:<span class="number">#fff</span>;</span><br><span class="line"> <span class="attribute">border</span>:<span class="number">1px</span> solid <span class="number">#ccc</span>;</span><br><span class="line"> <span class="attribute">max-width</span>:<span class="number">250px</span>;</span><br><span class="line"> <span class="attribute">min-width</span>:<span class="number">150px</span>;</span><br><span class="line"> <span class="attribute">max-height</span>:<span class="number">500px</span>;</span><br><span class="line"> <span class="attribute">overflow-y</span>:auto;</span><br><span class="line"> <span class="attribute">-webkit-box-shadow</span>:<span class="number">5px</span> <span class="number">5px</span> <span class="number">2px</span> <span class="number">#ccc</span>;</span><br><span class="line"> <span class="attribute">box-shadow</span>:<span class="number">5px</span> <span class="number">5px</span> <span class="number">2px</span> <span class="number">#ccc</span>;</span><br><span class="line"> <span class="attribute">font-size</span>:<span class="number">12px</span>;</span><br><span class="line"> <span class="attribute">padding</span>:<span class="number">10px</span>;</span><br><span class="line"> <span class="attribute">position</span>:fixed;</span><br><span class="line"> <span class="attribute">right</span>:<span class="number">35px</span>;</span><br><span class="line"> <span class="attribute">top</span>:<span class="number">129px</span></span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="selector-class">.toc-article</span> <span class="selector-class">.toc-close</span>&#123;</span><br><span class="line"> <span class="attribute">font-weight</span>:<span class="number">700</span>;</span><br><span class="line"> <span class="attribute">font-size</span>:<span class="number">20px</span>;</span><br><span class="line"> <span class="attribute">cursor</span>:pointer;</span><br><span class="line"> <span class="attribute">float</span>:right;<span class="attribute">color</span>:<span class="number">#ccc</span></span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="selector-class">.toc-article</span> <span class="selector-class">.toc-close</span><span class="selector-pseudo">:hover</span>&#123;</span><br><span class="line"> <span class="attribute">color</span>:<span class="number">#000</span></span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="selector-class">.toc-article</span> <span class="selector-class">.toc</span>&#123;</span><br><span class="line"> <span class="attribute">font-size</span>:<span class="number">12px</span>;</span><br><span class="line"> <span class="attribute">padding</span>:<span class="number">0</span>;</span><br><span class="line"> <span class="attribute">line-height</span>:<span class="number">20px</span></span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="selector-class">.toc-article</span> <span class="selector-class">.toc</span> <span class="selector-class">.toc-number</span>&#123;</span><br><span class="line"> <span class="attribute">color</span>:<span class="number">#333</span></span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="selector-class">.toc-article</span> <span class="selector-class">.toc</span> <span class="selector-class">.toc-text</span><span class="selector-pseudo">:hover</span>&#123;</span><br><span class="line"> <span class="attribute">text-decoration</span>:underline;</span><br><span class="line"> <span class="attribute">color</span>:<span class="number">#2a6496</span></span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="selector-class">.toc-article</span> <span class="selector-tag">li</span>&#123;</span><br><span class="line"> <span class="attribute">list-style-type</span>:none</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="selector-class">.toc-article</span> <span class="selector-class">.toc-level-1</span>&#123;</span><br><span class="line"> <span class="attribute">margin</span>:<span class="number">4px</span> <span class="number">0</span></span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="selector-class">.toc-article</span> <span class="selector-class">.toc-child</span>&#123;&#125;</span><br><span class="line"></span><br><span class="line"><span class="keyword">@-moz-keyframes</span> cd-bounce-<span class="number">1</span>&#123;</span><br><span class="line"> 0%&#123;</span><br><span class="line">     <span class="attribute">opacity</span>:<span class="number">0</span>;</span><br><span class="line">     <span class="attribute">-o-transform</span>:<span class="built_in">scale</span>(<span class="number">1</span>);</span><br><span class="line">     <span class="attribute">-webkit-transform</span>:<span class="built_in">scale</span>(<span class="number">1</span>);</span><br><span class="line">     <span class="attribute">-moz-transform</span>:<span class="built_in">scale</span>(<span class="number">1</span>);</span><br><span class="line">     <span class="attribute">-ms-transform</span>:<span class="built_in">scale</span>(<span class="number">1</span>);</span><br><span class="line">     <span class="attribute">transform</span>:<span class="built_in">scale</span>(<span class="number">1</span>)</span><br><span class="line"> &#125;</span><br><span class="line"> 60%&#123;</span><br><span class="line">     <span class="attribute">opacity</span>:<span class="number">1</span>;</span><br><span class="line">     <span class="attribute">-o-transform</span>:<span class="built_in">scale</span>(<span class="number">1.01</span>);</span><br><span class="line">     <span class="attribute">-webkit-transform</span>:<span class="built_in">scale</span>(<span class="number">1.01</span>);</span><br><span class="line">     <span class="attribute">-moz-transform</span>:<span class="built_in">scale</span>(<span class="number">1.01</span>);</span><br><span class="line">     <span class="attribute">-ms-transform</span>:<span class="built_in">scale</span>(<span class="number">1.01</span>);</span><br><span class="line">     <span class="attribute">transform</span>:<span class="built_in">scale</span>(<span class="number">1.01</span>)</span><br><span class="line"> &#125;</span><br><span class="line"> 100%&#123;</span><br><span class="line">     <span class="attribute">-o-transform</span>:<span class="built_in">scale</span>(<span class="number">1</span>);</span><br><span class="line">     <span class="attribute">-webkit-transform</span>:<span class="built_in">scale</span>(<span class="number">1</span>);</span><br><span class="line">     <span class="attribute">-moz-transform</span>:<span class="built_in">scale</span>(<span class="number">1</span>);</span><br><span class="line">     <span class="attribute">-ms-transform</span>:<span class="built_in">scale</span>(<span class="number">1</span>);</span><br><span class="line">     <span class="attribute">transform</span>:<span class="built_in">scale</span>(<span class="number">1</span>)&#125;</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="keyword">@-webkit-keyframes</span> cd-bounce-<span class="number">1</span>&#123;</span><br><span class="line"> 0%&#123;</span><br><span class="line">     <span class="attribute">opacity</span>:<span class="number">0</span>;</span><br><span class="line">     <span class="attribute">-o-transform</span>:<span class="built_in">scale</span>(<span class="number">1</span>);</span><br><span class="line">     <span class="attribute">-webkit-transform</span>:<span class="built_in">scale</span>(<span class="number">1</span>);</span><br><span class="line">     <span class="attribute">-moz-transform</span>:<span class="built_in">scale</span>(<span class="number">1</span>);</span><br><span class="line">     <span class="attribute">-ms-transform</span>:<span class="built_in">scale</span>(<span class="number">1</span>);</span><br><span class="line">     <span class="attribute">transform</span>:<span class="built_in">scale</span>(<span class="number">1</span>)</span><br><span class="line"> &#125;</span><br><span class="line"> 60%&#123;</span><br><span class="line">     <span class="attribute">opacity</span>:<span class="number">1</span>;</span><br><span class="line">     <span class="attribute">-o-transform</span>:<span class="built_in">scale</span>(<span class="number">1.01</span>);</span><br><span class="line">     <span class="attribute">-webkit-transform</span>:<span class="built_in">scale</span>(<span class="number">1.01</span>);</span><br><span class="line">     <span class="attribute">-moz-transform</span>:<span class="built_in">scale</span>(<span class="number">1.01</span>);</span><br><span class="line">     <span class="attribute">-ms-transform</span>:<span class="built_in">scale</span>(<span class="number">1.01</span>);</span><br><span class="line">     <span class="attribute">transform</span>:<span class="built_in">scale</span>(<span class="number">1.01</span>)</span><br><span class="line"> &#125;</span><br><span class="line"> 100%&#123;</span><br><span class="line">     <span class="attribute">-o-transform</span>:<span class="built_in">scale</span>(<span class="number">1</span>);</span><br><span class="line">     <span class="attribute">-webkit-transform</span>:<span class="built_in">scale</span>(<span class="number">1</span>);</span><br><span class="line">     <span class="attribute">-moz-transform</span>:<span class="built_in">scale</span>(<span class="number">1</span>);</span><br><span class="line">     <span class="attribute">-ms-transform</span>:<span class="built_in">scale</span>(<span class="number">1</span>);</span><br><span class="line">     <span class="attribute">transform</span>:<span class="built_in">scale</span>(<span class="number">1</span>)&#125;</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="keyword">@-o-keyframes</span> cd-bounce-<span class="number">1</span>&#123;</span><br><span class="line"> 0%&#123;</span><br><span class="line">     <span class="attribute">opacity</span>:<span class="number">0</span>;</span><br><span class="line">     <span class="attribute">-o-transform</span>:<span class="built_in">scale</span>(<span class="number">1</span>);</span><br><span class="line">     <span class="attribute">-webkit-transform</span>:<span class="built_in">scale</span>(<span class="number">1</span>);</span><br><span class="line">     <span class="attribute">-moz-transform</span>:<span class="built_in">scale</span>(<span class="number">1</span>);</span><br><span class="line">     <span class="attribute">-ms-transform</span>:<span class="built_in">scale</span>(<span class="number">1</span>);</span><br><span class="line">     <span class="attribute">transform</span>:<span class="built_in">scale</span>(<span class="number">1</span>)</span><br><span class="line"> &#125;</span><br><span class="line"> 60%&#123;</span><br><span class="line">     <span class="attribute">opacity</span>:<span class="number">1</span>;</span><br><span class="line">     <span class="attribute">-o-transform</span>:<span class="built_in">scale</span>(<span class="number">1.01</span>);</span><br><span class="line">     <span class="attribute">-webkit-transform</span>:<span class="built_in">scale</span>(<span class="number">1.01</span>);</span><br><span class="line">     <span class="attribute">-moz-transform</span>:<span class="built_in">scale</span>(<span class="number">1.01</span>);</span><br><span class="line">     <span class="attribute">-ms-transform</span>:<span class="built_in">scale</span>(<span class="number">1.01</span>);</span><br><span class="line">     <span class="attribute">transform</span>:<span class="built_in">scale</span>(<span class="number">1.01</span>)</span><br><span class="line"> &#125;</span><br><span class="line"> 100%&#123;</span><br><span class="line">     <span class="attribute">-o-transform</span>:<span class="built_in">scale</span>(<span class="number">1</span>);</span><br><span class="line">     <span class="attribute">-webkit-transform</span>:<span class="built_in">scale</span>(<span class="number">1</span>);</span><br><span class="line">     <span class="attribute">-moz-transform</span>:<span class="built_in">scale</span>(<span class="number">1</span>);</span><br><span class="line">     <span class="attribute">-ms-transform</span>:<span class="built_in">scale</span>(<span class="number">1</span>);</span><br><span class="line">     <span class="attribute">transform</span>:<span class="built_in">scale</span>(<span class="number">1</span>)&#125;</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="keyword">@keyframes</span> cd-bounce-<span class="number">1</span>&#123;</span><br><span class="line"> 0%&#123;</span><br><span class="line">     <span class="attribute">opacity</span>:<span class="number">0</span>;</span><br><span class="line">     <span class="attribute">-o-transform</span>:<span class="built_in">scale</span>(<span class="number">1</span>);</span><br><span class="line">     <span class="attribute">-webkit-transform</span>:<span class="built_in">scale</span>(<span class="number">1</span>);</span><br><span class="line">     <span class="attribute">-moz-transform</span>:<span class="built_in">scale</span>(<span class="number">1</span>);</span><br><span class="line">     <span class="attribute">-ms-transform</span>:<span class="built_in">scale</span>(<span class="number">1</span>);</span><br><span class="line">     <span class="attribute">transform</span>:<span class="built_in">scale</span>(<span class="number">1</span>)</span><br><span class="line"> &#125;</span><br><span class="line"> 60%&#123;</span><br><span class="line">     <span class="attribute">opacity</span>:<span class="number">1</span>;</span><br><span class="line">     <span class="attribute">-o-transform</span>:<span class="built_in">scale</span>(<span class="number">1.01</span>);</span><br><span class="line">     <span class="attribute">-webkit-transform</span>:<span class="built_in">scale</span>(<span class="number">1.01</span>);</span><br><span class="line">     <span class="attribute">-moz-transform</span>:<span class="built_in">scale</span>(<span class="number">1.01</span>);</span><br><span class="line">     <span class="attribute">-ms-transform</span>:<span class="built_in">scale</span>(<span class="number">1.01</span>);</span><br><span class="line">     <span class="attribute">transform</span>:<span class="built_in">scale</span>(<span class="number">1.01</span>)</span><br><span class="line"> &#125;</span><br><span class="line"> 100%&#123;</span><br><span class="line">     <span class="attribute">-o-transform</span>:<span class="built_in">scale</span>(<span class="number">1</span>);</span><br><span class="line">     <span class="attribute">-webkit-transform</span>:<span class="built_in">scale</span>(<span class="number">1</span>);</span><br><span class="line">     <span class="attribute">-moz-transform</span>:<span class="built_in">scale</span>(<span class="number">1</span>);</span><br><span class="line">     <span class="attribute">-ms-transform</span>:<span class="built_in">scale</span>(<span class="number">1</span>);</span><br><span class="line">     <span class="attribute">transform</span>:<span class="built_in">scale</span>(<span class="number">1</span>)&#125;</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="selector-class">.show-toc-btn</span>&#123;</span><br><span class="line"> <span class="attribute">display</span>:none;</span><br><span class="line"> <span class="attribute">z-index</span>:<span class="number">10</span>;</span><br><span class="line"> <span class="attribute">width</span>:<span class="number">30px</span>;</span><br><span class="line"> <span class="attribute">min-height</span>:<span class="number">14px</span>;</span><br><span class="line"> <span class="attribute">overflow</span>:hidden;</span><br><span class="line"> <span class="attribute">padding</span>:<span class="number">4px</span> <span class="number">6px</span> <span class="number">8px</span> <span class="number">5px</span>;</span><br><span class="line"> <span class="attribute">border</span>:<span class="number">1px</span> solid <span class="number">#ddd</span>;</span><br><span class="line"> <span class="attribute">border-right</span>:none;</span><br><span class="line"> <span class="attribute">position</span>:fixed;</span><br><span class="line"> <span class="attribute">right</span>:<span class="number">40px</span>;</span><br><span class="line"> <span class="attribute">text-align</span>:center;</span><br><span class="line"> <span class="attribute">background-color</span>:<span class="number">#f9f9f9</span></span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="selector-class">.show-toc-btn</span> <span class="selector-class">.btn-bg</span>&#123;</span><br><span class="line"> <span class="attribute">margintop</span>:<span class="number">2px</span>;</span><br><span class="line"> <span class="attribute">display</span>:block;</span><br><span class="line"> <span class="attribute">width</span>:<span class="number">16px</span>;</span><br><span class="line"> <span class="attribute">height</span>:<span class="number">14px</span>;</span><br><span class="line"> <span class="attribute">background</span>:<span class="built_in">url</span>(https://<span class="number">7</span>xtawy.com1.z0.glb.clouddn.com/show.png) no-repeat;</span><br><span class="line"> <span class="attribute">-webkit-background-size</span>:<span class="number">100%</span>;</span><br><span class="line"> <span class="attribute">-moz-background-size</span>:<span class="number">100%</span>;</span><br><span class="line"> <span class="attribute">background-size</span>:<span class="number">100%</span></span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="selector-class">.show-toc-btn</span> <span class="selector-class">.btn-text</span>&#123;</span><br><span class="line"> <span class="attribute">color</span>:<span class="number">#999</span>;</span><br><span class="line"> <span class="attribute">font-size</span>:<span class="number">12px</span></span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="selector-class">.show-toc-btn</span><span class="selector-pseudo">:hover</span>&#123;</span><br><span class="line"> <span class="attribute">cursor</span>:pointer</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="selector-class">.show-toc-btn</span><span class="selector-pseudo">:hover</span> <span class="selector-class">.btn-bg</span>&#123;</span><br><span class="line"> <span class="attribute">background-position</span>:<span class="number">0</span> -<span class="number">16px</span></span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="selector-class">.show-toc-btn</span><span class="selector-pseudo">:hover</span> <span class="selector-class">.btn-text</span>&#123;</span><br><span class="line"> <span class="attribute">font-size</span>:<span class="number">12px</span>;</span><br><span class="line"> <span class="attribute">color</span>:<span class="number">#ea8010</span></span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="selector-class">.toc-article</span> <span class="selector-tag">li</span> <span class="selector-tag">ol</span>, <span class="selector-class">.toc-article</span> <span class="selector-tag">li</span> <span class="selector-tag">ul</span> &#123;</span><br><span class="line"> <span class="attribute">margin-left</span>: <span class="number">30px</span>;</span><br><span class="line">&#125;</span><br><span class="line"><span class="selector-class">.toc-article</span> <span class="selector-tag">ol</span>, <span class="selector-class">.toc-article</span> <span class="selector-tag">ul</span> &#123;</span><br><span class="line"> <span class="attribute">margin</span>: <span class="number">10px</span> <span class="number">0</span>;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
</blockquote>
</li>
<li><p>修改ejs文件：</p>
<blockquote>
<p>找到<code>themes\yilia\layout\_partial\article.ejs</code>,在 <code>&lt;/header&gt; &lt;% } %&gt;</code>下面加入</p>
<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment">&lt;!-- 目录内容 --&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">%</span> <span class="attr">if</span> (!<span class="attr">index</span> &amp;&amp; <span class="attr">post.toc</span>)&#123; %&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">p</span> <span class="attr">class</span>=<span class="string">"show-toc-btn"</span> <span class="attr">id</span>=<span class="string">"show-toc-btn"</span> <span class="attr">onclick</span>=<span class="string">"showToc();"</span> <span class="attr">style</span>=<span class="string">"display:none"</span>&gt;</span></span><br><span class="line">          <span class="tag">&lt;<span class="name">span</span> <span class="attr">class</span>=<span class="string">"btn-bg"</span>&gt;</span><span class="tag">&lt;/<span class="name">span</span>&gt;</span></span><br><span class="line">          <span class="tag">&lt;<span class="name">span</span> <span class="attr">class</span>=<span class="string">"btn-text"</span>&gt;</span>文章导航<span class="tag">&lt;/<span class="name">span</span>&gt;</span></span><br><span class="line">          <span class="tag">&lt;/<span class="name">p</span>&gt;</span></span><br><span class="line">	<span class="tag">&lt;<span class="name">div</span> <span class="attr">id</span>=<span class="string">"toc-article"</span> <span class="attr">class</span>=<span class="string">"toc-article"</span>&gt;</span></span><br><span class="line">	    <span class="tag">&lt;<span class="name">span</span> <span class="attr">id</span>=<span class="string">"toc-close"</span> <span class="attr">class</span>=<span class="string">"toc-close"</span> <span class="attr">title</span>=<span class="string">"隐藏导航"</span> <span class="attr">onclick</span>=<span class="string">"showBtn();"</span>&gt;</span>×<span class="tag">&lt;/<span class="name">span</span>&gt;</span></span><br><span class="line">		<span class="tag">&lt;<span class="name">strong</span> <span class="attr">class</span>=<span class="string">"toc-title"</span>&gt;</span>文章目录<span class="tag">&lt;/<span class="name">strong</span>&gt;</span></span><br><span class="line">           <span class="tag">&lt;<span class="name">%-</span> <span class="attr">toc</span>(<span class="attr">post.content</span>) %&gt;</span></span><br><span class="line">         <span class="tag">&lt;/<span class="name">div</span>&gt;</span></span><br><span class="line">   <span class="tag">&lt;<span class="name">script</span> <span class="attr">type</span>=<span class="string">"text/javascript"</span>&gt;</span></span><br><span class="line"><span class="actionscript">	<span class="function"><span class="keyword">function</span> <span class="title">showToc</span><span class="params">()</span></span>&#123;</span></span><br><span class="line"><span class="javascript">		<span class="keyword">var</span> toc_article = <span class="built_in">document</span>.getElementById(<span class="string">"toc-article"</span>);</span></span><br><span class="line"><span class="javascript">		<span class="keyword">var</span> show_toc_btn = <span class="built_in">document</span>.getElementById(<span class="string">"show-toc-btn"</span>);</span></span><br><span class="line"><span class="actionscript">		toc_article.setAttribute(<span class="string">"style"</span>,<span class="string">"display:block"</span>);</span></span><br><span class="line"><span class="actionscript">		show_toc_btn.setAttribute(<span class="string">"style"</span>,<span class="string">"display:none"</span>);</span></span><br><span class="line">		&#125;;</span><br><span class="line"><span class="actionscript">	<span class="function"><span class="keyword">function</span> <span class="title">showBtn</span><span class="params">()</span></span>&#123;</span></span><br><span class="line"><span class="javascript">		<span class="keyword">var</span> toc_article = <span class="built_in">document</span>.getElementById(<span class="string">"toc-article"</span>);</span></span><br><span class="line"><span class="javascript">		<span class="keyword">var</span> show_toc_btn = <span class="built_in">document</span>.getElementById(<span class="string">"show-toc-btn"</span>);</span></span><br><span class="line"><span class="actionscript">		toc_article.setAttribute(<span class="string">"style"</span>,<span class="string">"display:none"</span>);</span></span><br><span class="line"><span class="actionscript">		show_toc_btn.setAttribute(<span class="string">"style"</span>,<span class="string">"display:block"</span>);</span></span><br><span class="line">		&#125;;</span><br><span class="line">   <span class="tag">&lt;/<span class="name">script</span>&gt;</span></span><br><span class="line">      <span class="tag">&lt;<span class="name">%</span> &#125; %&gt;</span></span><br><span class="line"><span class="comment">&lt;!-- 目录内容结束 --&gt;</span></span><br></pre></td></tr></table></figure>
</blockquote>
</li>
<li><p>注意：此时MD文件，即文章开头需要设置toc属性——<code>toc: true</code></p>
<blockquote>
<figure class="highlight yml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br></pre></td><td class="code"><pre><span class="line"><span class="meta">---</span></span><br><span class="line"><span class="attr">title:</span> 				 <span class="comment">#文章标题</span></span><br><span class="line"><span class="attr">categories:</span>                       <span class="comment">#文章分類目錄 可以省略    </span></span><br><span class="line"><span class="attr">toc:</span> <span class="literal">true</span>                            <span class="comment">#目录 需要安装插件或者主题自带</span></span><br><span class="line"><span class="attr">date:</span>                                   <span class="comment">#文章日期</span></span><br><span class="line"><span class="attr">tags:</span>                                    <span class="comment">#标签</span></span><br><span class="line"><span class="meta">---</span></span><br></pre></td></tr></table></figure>
</blockquote>
</li>
</ul>
<h4 id="3-5-字体美化"><a href="#3-5-字体美化" class="headerlink" title="3.5 字体美化"></a>3.5 字体美化</h4><ul>
<li><p>代码字体美化、颜色设置</p>
</li>
<li><p>正文字体美化</p>
<blockquote>
<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">font</span> <span class="attr">color</span>=<span class="string">"purple"</span> <span class="attr">face</span>=<span class="string">"Microsoft YaHei"</span> <span class="attr">size</span>= <span class="string">5</span>&gt;</span><span class="tag">&lt;<span class="name">b</span>&gt;</span>content内容 <span class="tag">&lt;/<span class="name">b</span>&gt;</span><span class="tag">&lt;/<span class="name">font</span>&gt;</span></span><br></pre></td></tr></table></figure>

<p>修改文件路径为<code>theme\yilia\source\main.0cf68a.css</code></p>
<figure class="highlight css"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line"># <span class="selector-tag">font-family</span>:字体</span><br><span class="line"><span class="selector-tag">font-family</span> : <span class="selector-tag">Times</span> <span class="selector-tag">New</span> <span class="selector-tag">Roman</span></span><br><span class="line"></span><br><span class="line"># <span class="selector-class">.article-entry</span> <span class="selector-class">.highlight</span> <span class="selector-class">.line</span>(<span class="selector-tag">color</span>:<span class="selector-id">#FFF----</span>默认白色</span><br><span class="line"><span class="selector-class">.article-entry</span> <span class="selector-class">.highlight</span> <span class="selector-class">.line</span>(<span class="selector-tag">color</span> : 十六进制颜色</span><br></pre></td></tr></table></figure>
</blockquote>
</li>
</ul>
<hr>
<h3 id="4-博客主页美化"><a href="#4-博客主页美化" class="headerlink" title="4. 博客主页美化"></a>4. 博客主页美化</h3><h4 id="4-1-修改博客标题、子标题、用户"><a href="#4-1-修改博客标题、子标题、用户" class="headerlink" title="4.1 修改博客标题、子标题、用户"></a>4.1 修改博客标题、子标题、用户</h4><ul>
<li><p>修改文件路径为博客根路径下的<code>_config.yml</code></p>
<blockquote>
<figure class="highlight yml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># Site</span></span><br><span class="line"><span class="attr">title:</span> <span class="string">Chthollists的平凡之路</span></span><br><span class="line"><span class="attr">subtitle:</span> <span class="string">'今日物语'</span></span><br><span class="line"><span class="attr">description:</span> <span class="string">''</span></span><br><span class="line"><span class="attr">keywords:</span> <span class="string">xxx</span></span><br><span class="line"><span class="attr">author:</span> <span class="string">'xxx'</span></span><br><span class="line"><span class="comment"># 设置为英文 en</span></span><br><span class="line"><span class="attr">language:</span> <span class="string">Zh-cn</span></span><br><span class="line"><span class="attr">timezone:</span> <span class="string">''</span></span><br></pre></td></tr></table></figure>
</blockquote>
</li>
</ul>
<h4 id="4-2-主页左侧显示文章总数"><a href="#4-2-主页左侧显示文章总数" class="headerlink" title="4.2 主页左侧显示文章总数"></a>4.2 主页左侧显示文章总数</h4><ul>
<li><p>在<code>themes\yilia\layout\_partial\left-col.ejs</code>文件</p>
<blockquote>
<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br></pre></td><td class="code"><pre><span class="line"># 查找</span><br><span class="line"><span class="tag">&lt;<span class="name">nav</span> <span class="attr">class</span>=<span class="string">"header-menu"</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">ul</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">%</span> <span class="attr">for</span> (<span class="attr">var</span> <span class="attr">i</span> <span class="attr">in</span> <span class="attr">theme.menu</span>)&#123; %&gt;</span></span><br><span class="line">        <span class="tag">&lt;<span class="name">li</span>&gt;</span><span class="tag">&lt;<span class="name">a</span> <span class="attr">href</span>=<span class="string">"&lt;%- url_for(theme.menu[i]) %&gt;"</span>&gt;</span><span class="tag">&lt;<span class="name">%=</span> <span class="attr">i</span> %&gt;</span><span class="tag">&lt;/<span class="name">a</span>&gt;</span><span class="tag">&lt;/<span class="name">li</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">%&#125;%</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;/<span class="name">ul</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">nav</span>&gt;</span></span><br><span class="line"></span><br><span class="line"># 后面添加</span><br><span class="line"><span class="tag">&lt;<span class="name">nav</span>&gt;</span></span><br><span class="line">    总文章数 <span class="tag">&lt;<span class="name">%=site.posts.length%</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">nav</span>&gt;</span></span><br></pre></td></tr></table></figure>
</blockquote>
</li>
</ul>
<h4 id="4-3-设置个性签名"><a href="#4-3-设置个性签名" class="headerlink" title="4.3 设置个性签名"></a>4.3 设置个性签名</h4><ul>
<li><p>在 <code>themes/yilia/_config.yml</code>文件中，修改aboutme项</p>
<blockquote>
<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">aboutme: <span class="tag">&lt;<span class="name">font</span> <span class="attr">color</span>=<span class="string">"purple"</span> <span class="attr">face</span>=<span class="string">"Microsoft YaHei"</span> <span class="attr">size</span>= <span class="string">5</span>&gt;</span><span class="tag">&lt;<span class="name">b</span>&gt;</span>content内容<span class="tag">&lt;<span class="name">br</span>&gt;</span> <span class="tag">&lt;/<span class="name">b</span>&gt;</span><span class="tag">&lt;/<span class="name">font</span>&gt;</span></span><br></pre></td></tr></table></figure>
</blockquote>
</li>
</ul>
<hr>
<hr>
<h2 id="五、高级功能实现"><a href="#五、高级功能实现" class="headerlink" title="五、高级功能实现"></a>五、高级功能实现</h2><ul>
<li>各功能教程超链接汇总<ul>
<li><a href="http://dongshuyan.com/2019/05/24/hexo%E5%8D%9A%E5%AE%A2%E6%B3%A8%E6%84%8F%E4%BA%8B%E9%A1%B9/" target="_blank" rel="noopener">微信分享</a></li>
<li><a href="https://blog.csdn.net/qq_37939980/article/details/104390332" target="_blank" rel="noopener">版权信息</a></li>
<li><a href="https://blog.csdn.net/qq_40922859/article/details/97035497?utm_medium=distribute.pc_relevant.none-task-blog-BlogCommendFromMachineLearnPai2-2.channel_param&depth_1-utm_source=distribute.pc_relevant.none-task-blog-BlogCommendFromMachineLearnPai2-2.channel_param" target="_blank" rel="noopener">不蒜子统计</a></li>
<li><a href="https://blog.csdn.net/qq_40922859/article/details/97035497?utm_medium=distribute.pc_relevant.none-task-blog-BlogCommendFromMachineLearnPai2-2.channel_param&depth_1-utm_source=distribute.pc_relevant.none-task-blog-BlogCommendFromMachineLearnPai2-2.channel_param" target="_blank" rel="noopener">爱心功能、评论系统</a></li>
<li><a href="https://blog.csdn.net/weixin_41287260/article/details/97693850" target="_blank" rel="noopener">音乐功能、404页面、头像旋转</a></li>
<li><a href="https://github.com/iissnan/hexo-theme-next/wiki/%E5%88%9B%E5%BB%BA%E5%88%86%E7%B1%BB%E9%A1%B5%E9%9D%A2" target="_blank" rel="noopener">分类、随笔、标签</a></li>
<li><a href="https://blog.csdn.net/weixin_41287260/article/details/97693850" target="_blank" rel="noopener">字数统计、阅读时长</a></li>
<li><a href="http://dongshuyan.com/2019/05/24/hexo%E5%8D%9A%E5%AE%A2%E6%B3%A8%E6%84%8F%E4%BA%8B%E9%A1%B9/" target="_blank" rel="noopener">live2D、转载说明</a></li>
<li><a href="https://blog.csdn.net/qq_40922859/article/details/97035497?utm_medium=distribute.pc_relevant.none-task-blog-BlogCommendFromMachineLearnPai2-2.channel_param&depth_1-utm_source=distribute.pc_relevant.none-task-blog-BlogCommendFromMachineLearnPai2-2.channel_param" target="_blank" rel="noopener">文章加密</a></li>
<li><a href="http://dongshuyan.com/2019/05/24/hexo%E5%8D%9A%E5%AE%A2%E6%B3%A8%E6%84%8F%E4%BA%8B%E9%A1%B9/" target="_blank" rel="noopener">更多功能</a></li>
</ul>
</li>
</ul>
<h3 id="1-微信分享功能"><a href="#1-微信分享功能" class="headerlink" title="1. 微信分享功能"></a>1. 微信分享功能</h3><blockquote>
<p>初始时微信分享功能有问题</p>
<p>解决方法：修改<code>themes\yilia\layout\_partial\post\share.ejs</code>文件</p>
</blockquote>
<ul>
<li><p>由于百度云已经不支持二维码生成功能，修改share.ejs的度盘链接，改为qrserver.com的api</p>
<blockquote>
<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line"># 查找</span><br><span class="line">//pan.baidu.com/share/qrcode?url=</span><br><span class="line"></span><br><span class="line"># 修改为</span><br><span class="line">//api.qrserver.com/v1/create-qr-code/?size=150x150&amp;data=</span><br></pre></td></tr></table></figure>
</blockquote>
</li>
<li><p>查找share.ejs中的</p>
<blockquote>
<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br></pre></td><td class="code"><pre><span class="line"># 查找</span><br><span class="line">var sUrl = url.replace(/index\.html$/, '');</span><br><span class="line">  sUrl = /^(http:|https:)\/\//.test(sUrl) ? sUrl : 'http:' + sUrl;</span><br><span class="line">  </span><br><span class="line"># 后面添加</span><br><span class="line"># 20与博客地址的长度相关</span><br><span class="line">test=sUrl.substring(20);</span><br></pre></td></tr></table></figure>
</blockquote>
</li>
<li><p>再将share.ejs中的</p>
<blockquote>
<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line"># 查找</span><br><span class="line">'//api.qrserver.com/v1/create-qr-code/?size=150x150&amp;data=' + sUrl</span><br><span class="line"></span><br><span class="line"># 改为</span><br><span class="line">'//api.qrserver.com/v1/create-qr-code/?size=150x150&amp;data=你的主页网址' + test</span><br></pre></td></tr></table></figure>
</blockquote>
</li>
<li><p>最终结果</p>
<blockquote>
<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br></pre></td><td class="code"><pre><span class="line"># 修改后代码</span><br><span class="line"><span class="tag">&lt;<span class="name">div</span> <span class="attr">class</span>=<span class="string">"page-modal wx-share js-wx-box"</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">a</span> <span class="attr">class</span>=<span class="string">"close js-modal-close"</span> <span class="attr">href</span>=<span class="string">"javascript:;"</span>&gt;</span><span class="tag">&lt;<span class="name">i</span> <span class="attr">class</span>=<span class="string">"icon icon-close"</span>&gt;</span><span class="tag">&lt;/<span class="name">i</span>&gt;</span><span class="tag">&lt;/<span class="name">a</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">p</span>&gt;</span>扫一扫，分享到微信<span class="tag">&lt;/<span class="name">p</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">div</span> <span class="attr">class</span>=<span class="string">"wx-qrcode"</span>&gt;</span></span><br><span class="line">      <span class="tag">&lt;<span class="name">img</span> <span class="attr">src</span>=<span class="string">"&lt;%- 'qrcode' in locals ? qrcode(sUrl) : '//api.qrserver.com/v1/create-qr-code/?size=150x150&amp;data=https://damonxiang.github.io' + test  %&gt;"</span> <span class="attr">alt</span>=<span class="string">"微信分享二维码"</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;/<span class="name">div</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">div</span>&gt;</span></span><br></pre></td></tr></table></figure>
</blockquote>
</li>
</ul>
<hr>
<h3 id="2-文章置顶功能"><a href="#2-文章置顶功能" class="headerlink" title="2. 文章置顶功能"></a>2. 文章置顶功能</h3><h4 id="2-1-安装插件"><a href="#2-1-安装插件" class="headerlink" title="2.1 安装插件"></a>2.1 安装插件</h4><ul>
<li><p>安装 hexo-generator-index-pin-top 模块</p>
<blockquote>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">npm uninstall hexo-generator-index --save</span><br><span class="line">npm install hexo-generator-index-pin-top --save</span><br></pre></td></tr></table></figure>
</blockquote>
</li>
</ul>
<h4 id="2-2-配置置顶标准"><a href="#2-2-配置置顶标准" class="headerlink" title="2.2 配置置顶标准"></a>2.2 配置置顶标准</h4><ul>
<li><p>打开<code>/themes/yilia/layout/post.ejs</code>在最前面加入代码</p>
<blockquote>
<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">%</span> <span class="attr">if</span> (<span class="attr">page.top</span>) &#123; %&gt;</span></span><br><span class="line">  <span class="tag">&lt;<span class="name">i</span> <span class="attr">class</span>=<span class="string">"fa fa-thumb-tack"</span>&gt;</span><span class="tag">&lt;/<span class="name">i</span>&gt;</span></span><br><span class="line">  <span class="tag">&lt;<span class="name">font</span> <span class="attr">color</span>=<span class="string">7D26CD</span>&gt;</span>置顶<span class="tag">&lt;/<span class="name">font</span>&gt;</span></span><br><span class="line">  <span class="tag">&lt;<span class="name">span</span> <span class="attr">class</span>=<span class="string">"post-meta-divider"</span>&gt;</span>|<span class="tag">&lt;/<span class="name">span</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">%</span> &#125; %&gt;</span></span><br></pre></td></tr></table></figure>
</blockquote>
</li>
</ul>
<h4 id="2-3-配置文章"><a href="#2-3-配置文章" class="headerlink" title="2.3 配置文章"></a>2.3 配置文章</h4><ul>
<li><p>在需要置顶的文章的Front-matter中加上top属性</p>
<blockquote>
<p>top后面的数字越大，优先级越高</p>
<figure class="highlight yml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line"><span class="meta">---</span></span><br><span class="line"><span class="attr">title:</span> <span class="string">博客简介</span></span><br><span class="line"><span class="attr">date:</span> <span class="string">xxx</span></span><br><span class="line"><span class="attr">top:</span> <span class="number">5</span></span><br><span class="line"><span class="meta">---</span></span><br></pre></td></tr></table></figure>
</blockquote>
</li>
</ul>
<h4 id="2-4-优先级配置"><a href="#2-4-优先级配置" class="headerlink" title="2.4 优先级配置"></a>2.4 优先级配置</h4><ul>
<li><p>修改根目录配置文件/_config.yml,top值-1标示根据top值倒序（正序设置为1即可），同样date也是根据创建日期倒序。</p>
<blockquote>
<figure class="highlight yml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># 查找</span></span><br><span class="line"><span class="attr">index_generator:</span></span><br><span class="line">  <span class="attr">path:</span> <span class="string">''</span></span><br><span class="line">  <span class="attr">per_page:</span> <span class="number">10</span></span><br><span class="line">  <span class="attr">order_by:</span> <span class="string">-date</span></span><br><span class="line">  </span><br><span class="line"><span class="comment"># 改为</span></span><br><span class="line"><span class="attr">index_generator:</span></span><br><span class="line">  <span class="attr">path:</span> <span class="string">''</span></span><br><span class="line">  <span class="attr">per_page:</span> <span class="number">10</span></span><br><span class="line">  <span class="attr">order_by:</span></span><br><span class="line">    <span class="attr">top:</span> <span class="number">-1</span></span><br><span class="line">    <span class="attr">date:</span> <span class="number">-1</span></span><br></pre></td></tr></table></figure>
</blockquote>
</li>
</ul>
<hr>
<h3 id="3-文章标签分类功能"><a href="#3-文章标签分类功能" class="headerlink" title="3. 文章标签分类功能"></a>3. 文章标签分类功能</h3><h4 id="3-1-文章分类功能"><a href="#3-1-文章分类功能" class="headerlink" title="3.1 文章分类功能"></a>3.1 文章分类功能</h4><ul>
<li><p>通过hexo新建一个页面，命名为 categories </p>
<blockquote>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">hexo new page categoties</span><br></pre></td></tr></table></figure>
</blockquote>
</li>
<li><p>编辑刚新建的页面，将页面的类型<code>type</code>设置为 categories ，主题将自动为这个页面显示所有分类。</p>
<blockquote>
<p>通过设置categoties，并在menu中添加对应链接来实现博文分类</p>
<p>categoties是不同级的，适合纵向文件分类    </p>
<figure class="highlight yml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line"><span class="attr">title:</span> <span class="string">分类</span></span><br><span class="line"><span class="attr">date:</span> <span class="number">2020</span><span class="number">-07</span><span class="number">-29</span> <span class="number">10</span><span class="string">:36:40</span></span><br><span class="line"><span class="attr">type:</span> <span class="string">"categories"</span></span><br><span class="line"><span class="attr">comments:</span> <span class="literal">false</span></span><br></pre></td></tr></table></figure>
</blockquote>
</li>
<li><p>菜单中添加链接。编辑主题的<code>_config.yml</code> ，将categories添加到menu中</p>
<blockquote>
<figure class="highlight yml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line"><span class="attr">menu:</span></span><br><span class="line">  <span class="attr">home:</span> <span class="string">/</span></span><br><span class="line">  <span class="attr">categories:</span> <span class="string">/categories</span></span><br><span class="line">  <span class="attr">archives:</span> <span class="string">/archives</span></span><br><span class="line">  <span class="attr">tags:</span> <span class="string">/tags</span></span><br></pre></td></tr></table></figure>
</blockquote>
</li>
</ul>
<h4 id="3-2-文章标签分类功能"><a href="#3-2-文章标签分类功能" class="headerlink" title="3.2 文章标签分类功能"></a>3.2 文章标签分类功能</h4><ul>
<li><p>MarkDown 各种标签设置</p>
<blockquote>
<p>通过设置tags，并在menu中添加对应链接来实现博文分类   </p>
<p>tags标签是同级的，适合横向文件分类 </p>
<figure class="highlight yml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br></pre></td><td class="code"><pre><span class="line"><span class="meta">---</span></span><br><span class="line"><span class="attr">title:</span> 				 <span class="comment">#文章标题</span></span><br><span class="line"><span class="attr">subtitle:</span>                            <span class="comment">#子标题</span></span><br><span class="line"><span class="attr">categories:</span>                       <span class="comment">#文章分類目錄 可以省略    </span></span><br><span class="line"><span class="attr">toc:</span> <span class="literal">true</span>                            <span class="comment">#目录 需要安装插件或者主题自带</span></span><br><span class="line"><span class="attr">reward:</span> <span class="literal">true</span>                      <span class="comment">#打赏 需要安装插件或者主题自带</span></span><br><span class="line"><span class="attr">declare:</span> <span class="literal">true</span>                      <span class="comment">#版权 需要安装插件或者主题自带</span></span><br><span class="line"><span class="attr">date:</span>                                   <span class="comment">#文章日期</span></span><br><span class="line"><span class="attr">header-img:</span>                        <span class="comment">#顶部背景图片</span></span><br><span class="line"><span class="attr">tags:</span>                                    <span class="comment">#标签</span></span><br><span class="line"><span class="meta">---</span></span><br></pre></td></tr></table></figure>
</blockquote>
</li>
</ul>
<hr>
<h3 id="4-添加404网页"><a href="#4-添加404网页" class="headerlink" title="4. 添加404网页"></a>4. 添加404网页</h3><ul>
<li><p>参考：<a href="https://docs.github.com/cn/github/working-with-github-pages/creating-a-custom-404-page-for-your-github-pages-site" target="_blank" rel="noopener">自定义Github Pages</a></p>
</li>
<li><p>在<code>/source/</code>目录下新建<code>404.md</code>在头部添加属性<code>permalink: /404.html</code>，页面内容可以自定义。</p>
<blockquote>
<p>推荐使用<a href="https://www.qq.com/404/" target="_blank" rel="noopener">腾讯公益404页面</a>（注意要把首页链接换成自己的）</p>
<p><code>404.md</code>文件内容</p>
<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br></pre></td><td class="code"><pre><span class="line">---</span><br><span class="line"># example 404.md </span><br><span class="line"></span><br><span class="line">title: 404 Not Found：该页无法显示 </span><br><span class="line"></span><br><span class="line">date: 2019-07-26 21:51:29 </span><br><span class="line"></span><br><span class="line">permalink: /404.html</span><br><span class="line">---</span><br><span class="line"></span><br><span class="line"><span class="meta">&lt;!DOCTYPE <span class="meta-keyword">html</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">html</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">head</span>&gt;</span></span><br><span class="line">        <span class="tag">&lt;<span class="name">meta</span> <span class="attr">charset</span>=<span class="string">"UTF-8"</span> /&gt;</span></span><br><span class="line">        <span class="tag">&lt;<span class="name">title</span>&gt;</span>404<span class="tag">&lt;/<span class="name">title</span>&gt;</span>                              </span><br><span class="line">    <span class="tag">&lt;/<span class="name">head</span>&gt;</span>    </span><br><span class="line">    <span class="tag">&lt;<span class="name">body</span>&gt;</span></span><br><span class="line">        <span class="tag">&lt;<span class="name">script</span> <span class="attr">type</span>=<span class="string">"text/javascript"</span> <span class="attr">src</span>=<span class="string">"//qzonestyle.gtimg.cn/qzone/hybrid/app/404/search_children.js"</span> <span class="attr">homePageName</span>=<span class="string">"返回首页"</span> <span class="attr">homePageUrl</span>=<span class="string">"https://chthollists.github.io/"</span>&gt;</span><span class="tag">&lt;/<span class="name">script</span>&gt;</span> </span><br><span class="line">    <span class="tag">&lt;/<span class="name">body</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">html</span>&gt;</span></span><br></pre></td></tr></table></figure>
</blockquote>
</li>
</ul>
<hr>
<h3 id="5-头像旋转功能"><a href="#5-头像旋转功能" class="headerlink" title="5. 头像旋转功能"></a>5. 头像旋转功能</h3><ul>
<li><p>在<code>themes\yilia\source\</code>文件夹下增加一个css文件<code>avatarrotation.css</code>用来旋转360度</p>
<blockquote>
<p><code>avatarrotation.css</code>内容</p>
<figure class="highlight css"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br></pre></td><td class="code"><pre><span class="line"><span class="selector-class">.left-col</span> <span class="selector-id">#header</span> <span class="selector-class">.profilepic</span> <span class="selector-tag">img</span> &#123;</span><br><span class="line">	<span class="comment">/* 控制旋转速度时间*/</span></span><br><span class="line">  <span class="attribute">-webkit-transition</span>: -webkit-transform <span class="number">1.0s</span> ease-out;</span><br><span class="line">  <span class="attribute">-moz-transition</span>: -moz-transform <span class="number">1.0s</span> ease-out;</span><br><span class="line">  <span class="attribute">transition</span>: transform <span class="number">1.0s</span> ease-out;</span><br><span class="line">&#125;</span><br><span class="line"><span class="selector-class">.left-col</span> <span class="selector-id">#header</span> <span class="selector-class">.profilepic</span> <span class="selector-tag">img</span><span class="selector-pseudo">:hover</span> &#123;</span><br><span class="line">	<span class="comment">/* 鼠标经过360% */</span></span><br><span class="line">  <span class="attribute">-webkit-transform</span>: <span class="built_in">rotateZ</span>(<span class="number">360deg</span>);</span><br><span class="line">  <span class="attribute">-moz-transform</span>: <span class="built_in">rotateZ</span>(<span class="number">360deg</span>);</span><br><span class="line">  <span class="attribute">transform</span>: <span class="built_in">rotateZ</span>(<span class="number">360deg</span>);</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
</blockquote>
</li>
<li><p>然后在<code>themes\yilia\layout\_partial\head.ejs</code>文件中添加进去创建的<code>css</code>文件：<br>找到<code>&lt;%- partial(&#39;css&#39;) %&gt;</code>，在它的下面添加代码，把刚才写的文件添加进去，</p>
<blockquote>
<p><strong>注意！！是在它的下面添加，不然旋转速度将不会生效</strong></p>
<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">%</span> <span class="attr">if</span> (<span class="attr">theme.avatarrotation</span>)&#123; %&gt;</span></span><br><span class="line">	<span class="tag">&lt;<span class="name">link</span> <span class="attr">rel</span>=<span class="string">"stylesheet"</span> <span class="attr">type</span>=<span class="string">"text/css"</span> <span class="attr">href</span>=<span class="string">"/./avatarrotation.css"</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">%</span> &#125; %&gt;</span></span><br></pre></td></tr></table></figure>
</blockquote>
</li>
<li><p>最后在<code>theme\_config.yml</code>中添加</p>
<blockquote>
<figure class="highlight yml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment">#头像是否旋转(如果不要旋转取false)</span></span><br><span class="line"><span class="attr">avatarrotation:</span> <span class="literal">true</span></span><br></pre></td></tr></table></figure>
</blockquote>
</li>
</ul>
<hr>
<h3 id="6-修改默认文章格式"><a href="#6-修改默认文章格式" class="headerlink" title="6. 修改默认文章格式"></a>6. 修改默认文章格式</h3><blockquote>
<p>修改hexo new “article” 的Front-matter的属性</p>
</blockquote>
<ul>
<li><p>修改根目录下的<code>scaffolds</code>文件夹的post.md`</p>
<blockquote>
<figure class="highlight yml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br></pre></td><td class="code"><pre><span class="line"><span class="attr">title:</span> <span class="string">&#123;&#123;</span> <span class="string">title</span> <span class="string">&#125;&#125;</span></span><br><span class="line"><span class="attr">date:</span> <span class="string">&#123;&#123;</span> <span class="string">date</span> <span class="string">&#125;&#125;</span></span><br><span class="line"><span class="attr">subtitle:</span>                         <span class="comment">#子标题</span></span><br><span class="line"><span class="attr">categories:</span>                       <span class="comment">#文章分類目錄 可以省略    </span></span><br><span class="line"><span class="attr">toc:</span> <span class="literal">true</span>                         <span class="comment">#目录 需要安装插件或者主题自带</span></span><br><span class="line"><span class="attr">reward:</span> <span class="literal">true</span>                      <span class="comment">#打赏 需要安装插件或者主题自带</span></span><br><span class="line"><span class="attr">declare:</span> <span class="literal">true</span>                     <span class="comment">#版权 需要安装插件或者主题自带</span></span><br><span class="line"><span class="attr">header-img:</span>                       <span class="comment">#顶部背景图片</span></span><br><span class="line"><span class="attr">top:</span> </span><br><span class="line"><span class="attr">password:</span> </span><br><span class="line"><span class="attr">abstract:</span> </span><br><span class="line"><span class="attr">message:</span> </span><br><span class="line"><span class="attr">tags:</span>                             <span class="comment">#标签</span></span><br></pre></td></tr></table></figure>
</blockquote>
</li>
</ul>
<hr>
<h3 id="7-不蒜子统计功能"><a href="#7-不蒜子统计功能" class="headerlink" title="7. 不蒜子统计功能"></a>7. 不蒜子统计功能</h3><h4 id="7-1-安装不蒜子统计脚本"><a href="#7-1-安装不蒜子统计脚本" class="headerlink" title="7.1 安装不蒜子统计脚本"></a>7.1 安装不蒜子统计脚本</h4><ul>
<li><p><a href="http://busuanzi.ibruce.info/" target="_blank" rel="noopener">不蒜子官网</a></p>
</li>
<li><p>不蒜子用来统计博客的访问量在<code>themes\yilia\layout\_partial\after-footer.ejs</code>文件最后添加</p>
<blockquote>
<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">script</span>  <span class="attr">async</span>  <span class="attr">src</span>=<span class="string">"https://busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"</span>&gt;</span><span class="tag">&lt;/<span class="name">script</span>&gt;</span></span><br></pre></td></tr></table></figure>
</blockquote>
</li>
</ul>
<h4 id="7-2-博客访问量统计"><a href="#7-2-博客访问量统计" class="headerlink" title="7.2 博客访问量统计"></a>7.2 博客访问量统计</h4><ul>
<li><p>在<code>themes\yilia\layout\_partial\footer.ejs</code>中</p>
<blockquote>
<p>在<code>&lt;div class=&quot;footer-right&quot;&gt;</code>标签内添加：</p>
<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment">&lt;!-- # PV方式，单个用户连续点击 n 篇，记录 n 次记录值 --&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">span</span> <span class="attr">id</span>=<span class="string">"busuanzi_container_site_pv"</span>&gt;</span> 总访问量: <span class="tag">&lt;<span class="name">span</span> <span class="attr">id</span>=<span class="string">"busuanzi_value_site_pv"</span>&gt;</span><span class="tag">&lt;/<span class="name">span</span>&gt;</span> /<span class="tag">&lt;/<span class="name">span</span>&gt;</span></span><br><span class="line"><span class="comment">&lt;!-- # UV方式，单个用户连续点击 n 篇，记录 1 次记录值 --&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">span</span> <span class="attr">id</span>=<span class="string">"busuanzi_container_site_uv"</span>&gt;</span>  访客数:<span class="tag">&lt;<span class="name">span</span> <span class="attr">id</span>=<span class="string">"busuanzi_value_site_uv"</span>&gt;</span><span class="tag">&lt;/<span class="name">span</span>&gt;</span><span class="tag">&lt;/<span class="name">span</span>&gt;</span></span><br></pre></td></tr></table></figure>
</blockquote>
</li>
<li><p>美化显示</p>
<blockquote>
<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">font</span> <span class="attr">color</span>=<span class="string">"red"</span> <span class="attr">face</span>=<span class="string">"Microsoft YaHei"</span> <span class="attr">size</span>= <span class="string">3</span>&gt;</span><span class="tag">&lt;<span class="name">b</span>&gt;</span> 内容：<span class="tag">&lt;<span class="name">%=content%</span>&gt;</span><span class="tag">&lt;/<span class="name">b</span>&gt;</span><span class="tag">&lt;/<span class="name">font</span>&gt;</span></span><br></pre></td></tr></table></figure>

<p>内容：&lt;%=content%&gt;根据需求改变</p>
</blockquote>
</li>
</ul>
<h4 id="7-3-单篇文章点击量统计方法一"><a href="#7-3-单篇文章点击量统计方法一" class="headerlink" title="7.3 单篇文章点击量统计方法一"></a>7.3 单篇文章点击量统计方法一</h4><ul>
<li><p>在<code>themes/yilia/layout/_partial/article.ejs</code>中</p>
<blockquote>
<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">%-</span> <span class="attr">partial</span>('<span class="attr">post</span>/<span class="attr">title</span>', &#123;<span class="attr">class_name:</span> '<span class="attr">article-title</span>'&#125;) %&gt;</span></span><br></pre></td></tr></table></figure>

<p>后面添加如下代码：</p>
<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment">&lt;!--显示阅读次数--&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">%</span> <span class="attr">if</span> (!<span class="attr">index</span> &amp;&amp; <span class="attr">post.comments</span>)&#123; %&gt;</span></span><br><span class="line">  <span class="tag">&lt;<span class="name">br</span>/&gt;</span></span><br><span class="line">  <span class="tag">&lt;<span class="name">a</span> <span class="attr">class</span>=<span class="string">"cloud-tie-join-count"</span> <span class="attr">href</span>=<span class="string">"javascript:void(0);"</span> <span class="attr">style</span>=<span class="string">"color:gray;font-size:14px;"</span>&gt;</span></span><br><span class="line">  <span class="tag">&lt;<span class="name">span</span> <span class="attr">class</span>=<span class="string">"icon-sort"</span>&gt;</span><span class="tag">&lt;/<span class="name">span</span>&gt;</span></span><br><span class="line">  <span class="tag">&lt;<span class="name">span</span> <span class="attr">id</span>=<span class="string">"busuanzi_container_page_pv"</span> <span class="attr">style</span>=<span class="string">"color:#ef7522;font-size:14px;"</span>&gt;</span></span><br><span class="line">            阅读数: <span class="tag">&lt;<span class="name">span</span> <span class="attr">id</span>=<span class="string">"busuanzi_value_page_pv"</span>&gt;</span><span class="tag">&lt;/<span class="name">span</span>&gt;</span>次 <span class="symbol">&amp;nbsp;</span><span class="symbol">&amp;nbsp;</span></span><br><span class="line">  <span class="tag">&lt;/<span class="name">span</span>&gt;</span></span><br><span class="line">  <span class="tag">&lt;/<span class="name">a</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">%</span> &#125; %&gt;</span></span><br><span class="line"><span class="comment">&lt;!--显示阅读次数完毕--&gt;</span></span><br></pre></td></tr></table></figure>
</blockquote>
</li>
</ul>
<h4 id="7-4-单篇文章点击量统计方法二"><a href="#7-4-单篇文章点击量统计方法二" class="headerlink" title="7.4 单篇文章点击量统计方法二"></a>7.4 单篇文章点击量统计方法二</h4><ul>
<li><p>找到<code>themes\yilia\layout\_partial\post\nav.ejs</code>，注释掉以下两行：大概在27行左右(无此代码请忽略)</p>
<blockquote>
<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">span</span> <span class="attr">class</span>=<span class="string">"post-meta-item-text"</span>&gt;</span>本文阅读量 <span class="tag">&lt;/<span class="name">span</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">span</span> <span class="attr">class</span>=<span class="string">"leancloud-visitors-count"</span>&gt;</span>8848<span class="tag">&lt;/<span class="name">span</span>&gt;</span></span><br></pre></td></tr></table></figure>

<p>注释掉之后直接在这两行下面加上：</p>
<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">span</span> <span class="attr">id</span>=<span class="string">"busuanzi_container_page_pv"</span>&gt;</span></span><br><span class="line">        本文阅读量: <span class="tag">&lt;<span class="name">span</span> <span class="attr">id</span>=<span class="string">"busuanzi_value_page_pv"</span>&gt;</span><span class="tag">&lt;/<span class="name">span</span>&gt;</span>次</span><br><span class="line"> <span class="tag">&lt;/<span class="name">span</span>&gt;</span></span><br></pre></td></tr></table></figure>
</blockquote>
</li>
</ul>
<h4 id="7-5-不蒜子统计与Live2D冲突问题"><a href="#7-5-不蒜子统计与Live2D冲突问题" class="headerlink" title="7.5 不蒜子统计与Live2D冲突问题"></a>7.5 不蒜子统计与Live2D冲突问题</h4><ul>
<li><p>参考：<a href="https://boyinthesun.cn/post/error-live2d-busuanzi/" target="_blank" rel="noopener">不蒜子功能失效</a></p>
</li>
<li><p>问题：当配置了Live2D功能后，不蒜子统计功能会与其发生冲突从而失效</p>
</li>
<li><p>分析：查看网页源码Ctrl+u，可以发现：</p>
<ul>
<li><p>不蒜子功能正常时</p>
<blockquote>
<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br></pre></td><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">span</span> <span class="attr">id</span>=<span class="string">"busuanzi_container_site_pv"</span>&gt;</span></span><br><span class="line">    |<span class="symbol">&amp;nbsp;</span><span class="tag">&lt;<span class="name">i</span> <span class="attr">class</span>=<span class="string">"far fa-eye"</span>&gt;</span><span class="tag">&lt;/<span class="name">i</span>&gt;</span><span class="symbol">&amp;nbsp;</span>总访问量:<span class="symbol">&amp;nbsp;</span><span class="tag">&lt;<span class="name">span</span> <span class="attr">id</span>=<span class="string">"busuanzi_value_site_pv"</span></span></span><br><span class="line"><span class="tag">        <span class="attr">class</span>=<span class="string">"white-color"</span>&gt;</span><span class="tag">&lt;/<span class="name">span</span>&gt;</span><span class="symbol">&amp;nbsp;</span>次</span><br><span class="line">    <span class="tag">&lt;/<span class="name">span</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">span</span> <span class="attr">id</span>=<span class="string">"busuanzi_container_site_uv"</span>&gt;</span></span><br><span class="line">    |<span class="symbol">&amp;nbsp;</span><span class="tag">&lt;<span class="name">i</span> <span class="attr">class</span>=<span class="string">"fas fa-users"</span>&gt;</span><span class="tag">&lt;/<span class="name">i</span>&gt;</span><span class="symbol">&amp;nbsp;</span>总访问人数:<span class="symbol">&amp;nbsp;</span><span class="tag">&lt;<span class="name">span</span> <span class="attr">id</span>=<span class="string">"busuanzi_value_site_uv"</span></span></span><br><span class="line"><span class="tag">        <span class="attr">class</span>=<span class="string">"white-color"</span>&gt;</span><span class="tag">&lt;/<span class="name">span</span>&gt;</span><span class="symbol">&amp;nbsp;</span>人</span><br><span class="line">    <span class="tag">&lt;/<span class="name">span</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">span</span>&gt;</span></span><br></pre></td></tr></table></figure>
</blockquote>
</li>
<li><p>不蒜子功能失效时</p>
<blockquote>
<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br></pre></td><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">span</span> <span class="attr">id</span>=<span class="string">"busuanzi_container_site_pv"</span> <span class="attr">style</span>=<span class="string">"display: none;"</span>&gt;</span></span><br><span class="line">    |<span class="symbol">&amp;nbsp;</span><span class="tag">&lt;<span class="name">i</span> <span class="attr">class</span>=<span class="string">"far fa-eye"</span>&gt;</span><span class="tag">&lt;/<span class="name">i</span>&gt;</span><span class="symbol">&amp;nbsp;</span>总访问量:<span class="symbol">&amp;nbsp;</span><span class="tag">&lt;<span class="name">span</span> <span class="attr">id</span>=<span class="string">"busuanzi_value_site_pv"</span> </span></span><br><span class="line"><span class="tag">        <span class="attr">class</span>=<span class="string">"white-color"</span>&gt;</span>2303950<span class="tag">&lt;/<span class="name">span</span>&gt;</span><span class="symbol">&amp;nbsp;</span>次</span><br><span class="line"><span class="tag">&lt;/<span class="name">span</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">span</span> <span class="attr">id</span>=<span class="string">"busuanzi_container_site_uv"</span> <span class="attr">style</span>=<span class="string">"display: none;"</span>&gt;</span></span><br><span class="line">    |<span class="symbol">&amp;nbsp;</span><span class="tag">&lt;<span class="name">i</span> <span class="attr">class</span>=<span class="string">"fas fa-users"</span>&gt;</span><span class="tag">&lt;/<span class="name">i</span>&gt;</span><span class="symbol">&amp;nbsp;</span>总访问人数:<span class="symbol">&amp;nbsp;</span><span class="tag">&lt;<span class="name">span</span> <span class="attr">id</span>=<span class="string">"busuanzi_value_site_uv"</span> </span></span><br><span class="line"><span class="tag">        <span class="attr">class</span>=<span class="string">"white-color"</span>&gt;</span>160644<span class="tag">&lt;/<span class="name">span</span>&gt;</span><span class="symbol">&amp;nbsp;</span>人</span><br><span class="line"><span class="tag">&lt;/<span class="name">span</span>&gt;</span></span><br></pre></td></tr></table></figure>
</blockquote>
</li>
<li><p>所以导致失效的原因是多了一个display的属性值变成了none，从而不显示不蒜子统计</p>
<blockquote>
<figure class="highlight js"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">style=<span class="string">"display: none;"</span></span><br></pre></td></tr></table></figure>
</blockquote>
</li>
</ul>
</li>
<li><p>解决办法：</p>
<ul>
<li><p>打开不蒜子官网上的<a href="https://busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js" target="_blank" rel="noopener">busuanzi.pure.mini.js</a>文件，将其下载到本地，放到yilia主题下的路径中</p>
<blockquote>
<p>如：<code>theme/yilia/source</code>路径</p>
</blockquote>
</li>
<li><p>修改busuanzi.pure.mini.js文件</p>
<blockquote>
<figure class="highlight js"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line"># 找到</span><br><span class="line">b.style.display=<span class="string">"none"</span></span><br><span class="line"></span><br><span class="line"># 改为</span><br><span class="line">b.style.display=<span class="string">''</span></span><br></pre></td></tr></table></figure>
</blockquote>
</li>
<li><p>修改不蒜子统计的调用语句</p>
<blockquote>
<p>原来是从不蒜子统计的服务器上调用busuanzi.pure.mini.js</p>
<p>现在直接从本地调用，还可以避免不蒜子官网域名改变导致的功能失效问题</p>
</blockquote>
<blockquote>
<p>路径：<code>themes\yilia\layout\_partial\after-footer.ejs</code></p>
<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line"># 原始</span><br><span class="line"><span class="tag">&lt;<span class="name">script</span>  <span class="attr">async</span>  <span class="attr">src</span>=<span class="string">"https://busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"</span>&gt;</span><span class="tag">&lt;/<span class="name">script</span>&gt;</span></span><br><span class="line"></span><br><span class="line"># 修改为本地路径：/busuanzi.pure.mini.js</span><br><span class="line"><span class="tag">&lt;<span class="name">script</span>  <span class="attr">async</span>  <span class="attr">src</span>=<span class="string">"/busuanzi.pure.mini.js"</span>&gt;</span><span class="tag">&lt;/<span class="name">script</span>&gt;</span></span><br></pre></td></tr></table></figure>
</blockquote>
</li>
</ul>
</li>
</ul>
<hr>
<h3 id="8-字数统计和阅读时长功能"><a href="#8-字数统计和阅读时长功能" class="headerlink" title="8. 字数统计和阅读时长功能"></a>8. 字数统计和阅读时长功能</h3><h4 id="8-1-字数统计"><a href="#8-1-字数统计" class="headerlink" title="8.1 字数统计"></a>8.1 字数统计</h4><ul>
<li><p>安装插件 hexo-wordcount</p>
<blockquote>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">npm i -save hexo-wordcount</span><br></pre></td></tr></table></figure>
</blockquote>
</li>
<li><p>博客根目录<code>_config.yml</code>添加配置</p>
<blockquote>
<figure class="highlight yml"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><span class="attr">word_count:</span> <span class="literal">true</span></span><br></pre></td></tr></table></figure>
</blockquote>
</li>
<li><p>修改<code>themes\yilia\layout\_partial\article.ejs</code></p>
<blockquote>
<p>查找</p>
<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">%-</span> <span class="attr">partial</span>('<span class="attr">post</span>/<span class="attr">date</span>', &#123;<span class="attr">class_name:</span> '<span class="attr">archive-article-date</span>', <span class="attr">date_format:</span> <span class="attr">null</span>&#125;) %&gt;</span></span><br></pre></td></tr></table></figure>

<p>后面添加</p>
<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">%</span> <span class="attr">if</span>(<span class="attr">theme.word_count</span> &amp;&amp; !<span class="attr">post.no_word_count</span>)&#123;%&gt;</span></span><br><span class="line">          <span class="tag">&lt;<span class="name">%-</span> <span class="attr">partial</span>('<span class="attr">post</span>/<span class="attr">word</span>') %&gt;</span></span><br><span class="line">          <span class="tag">&lt;<span class="name">%</span> &#125; %&gt;</span></span><br></pre></td></tr></table></figure>
</blockquote>
</li>
<li><p>最后在<code>themes\yilia\layout\_partial\post</code>目录下新建<code>word.ejs</code>,内容如下</p>
<blockquote>
<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br></pre></td><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">div</span> <span class="attr">style</span>=<span class="string">"margin-top:10px;"</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">span</span> <span class="attr">class</span>=<span class="string">"post-time"</span>&gt;</span></span><br><span class="line">      <span class="tag">&lt;<span class="name">span</span> <span class="attr">class</span>=<span class="string">"post-meta-item-icon"</span>&gt;</span></span><br><span class="line">        <span class="tag">&lt;<span class="name">i</span> <span class="attr">class</span>=<span class="string">"fa fa-keyboard-o"</span>&gt;</span><span class="tag">&lt;/<span class="name">i</span>&gt;</span></span><br><span class="line">        <span class="tag">&lt;<span class="name">span</span> <span class="attr">class</span>=<span class="string">"post-meta-item-text"</span> <span class="attr">style</span>=<span class="string">"font-size: 16px;color: grey"</span>&gt;</span>  字数统计: <span class="tag">&lt;/<span class="name">span</span>&gt;</span></span><br><span class="line">        <span class="comment">&lt;!--这里样式可以自己定制--&gt;</span></span><br><span class="line">        <span class="tag">&lt;<span class="name">span</span> <span class="attr">class</span>=<span class="string">"post-count"</span> <span class="attr">style</span>=<span class="string">"font-size: 16px;color: grey"</span>&gt;</span><span class="tag">&lt;<span class="name">%=</span> <span class="attr">wordcount</span>(<span class="attr">post.content</span>) %&gt;</span>字<span class="tag">&lt;/<span class="name">span</span>&gt;</span></span><br><span class="line">      <span class="tag">&lt;/<span class="name">span</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;/<span class="name">span</span>&gt;</span></span><br><span class="line"></span><br><span class="line">    <span class="tag">&lt;<span class="name">span</span> <span class="attr">class</span>=<span class="string">"post-time"</span>&gt;</span></span><br><span class="line">      <span class="symbol">&amp;nbsp;</span> | <span class="symbol">&amp;nbsp;</span></span><br><span class="line">      <span class="tag">&lt;<span class="name">span</span> <span class="attr">class</span>=<span class="string">"post-meta-item-icon"</span>&gt;</span></span><br><span class="line">        <span class="tag">&lt;<span class="name">i</span> <span class="attr">class</span>=<span class="string">"fa fa-hourglass-half"</span>&gt;</span><span class="tag">&lt;/<span class="name">i</span>&gt;</span></span><br><span class="line">        <span class="tag">&lt;<span class="name">span</span> <span class="attr">class</span>=<span class="string">"post-meta-item-text"</span> <span class="attr">style</span>=<span class="string">"font-size: 16px;color: grey"</span>&gt;</span>  阅读时长: <span class="tag">&lt;/<span class="name">span</span>&gt;</span></span><br><span class="line">        <span class="tag">&lt;<span class="name">span</span> <span class="attr">class</span>=<span class="string">"post-count"</span> <span class="attr">style</span>=<span class="string">"font-size: 16px;color: grey"</span>&gt;</span><span class="tag">&lt;<span class="name">%=</span> <span class="attr">min2read</span>(<span class="attr">post.content</span>) %&gt;</span>分<span class="tag">&lt;/<span class="name">span</span>&gt;</span></span><br><span class="line">      <span class="tag">&lt;/<span class="name">span</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;/<span class="name">span</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">div</span>&gt;</span></span><br></pre></td></tr></table></figure>
</blockquote>
</li>
</ul>
<h4 id="8-2-阅读时长统计"><a href="#8-2-阅读时长统计" class="headerlink" title="8.2 阅读时长统计"></a>8.2 阅读时长统计</h4><blockquote>
<p>步骤与7.1相同</p>
</blockquote>
<ul>
<li>安装插件 hexo-wordcount</li>
<li>博客根目录<code>_config.yml</code>添加配置</li>
<li>修改<code>themes\yilia\layout\_partial\article.ejs</code></li>
<li>最后在<code>themes\yilia\layout\_partial\post</code>目录下新建<code>word.ejs</code></li>
</ul>
<hr>
<h3 id="9-背景音乐功能"><a href="#9-背景音乐功能" class="headerlink" title="9. 背景音乐功能"></a>9. 背景音乐功能</h3><blockquote>
<p>使用网易云音乐</p>
</blockquote>
<h4 id="9-1-文章内音乐"><a href="#9-1-文章内音乐" class="headerlink" title="9.1 文章内音乐"></a>9.1 文章内音乐</h4><ul>
<li><p>从网易云音乐获取音乐外链</p>
<blockquote>
<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">iframe</span> <span class="attr">frameborder</span>=<span class="string">"no"</span> <span class="attr">border</span>=<span class="string">"0"</span> <span class="attr">marginwidth</span>=<span class="string">"0"</span> <span class="attr">marginheight</span>=<span class="string">"0"</span> <span class="attr">width</span>=<span class="string">330</span> <span class="attr">height</span>=<span class="string">86</span> <span class="attr">src</span>=<span class="string">"//music.163.com/outchain/player?type=2&amp;id=468490592&amp;auto=0&amp;height=66"</span>&gt;</span><span class="tag">&lt;/<span class="name">iframe</span>&gt;</span></span><br></pre></td></tr></table></figure>
</blockquote>
</li>
<li><p>将外链输入到文章中即可</p>
<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">iframe</span> <span class="attr">frameborder</span>=<span class="string">"no"</span> <span class="attr">border</span>=<span class="string">"0"</span> <span class="attr">marginwidth</span>=<span class="string">"0"</span> <span class="attr">marginheight</span>=<span class="string">"0"</span> <span class="attr">width</span>=<span class="string">330</span> <span class="attr">height</span>=<span class="string">110</span> <span class="attr">src</span>=<span class="string">"//music.163.com/outchain/player?type=4&amp;id=1217042&amp;auto=0&amp;height=90"</span>&gt;</span><span class="tag">&lt;/<span class="name">iframe</span>&gt;</span></span><br></pre></td></tr></table></figure>

</li>
</ul>
<h4 id="9-2-主页背景音乐"><a href="#9-2-主页背景音乐" class="headerlink" title="9.2 主页背景音乐"></a>9.2 主页背景音乐</h4><ul>
<li><p>获取外链</p>
<blockquote>
<p>注意：要获取多个音乐的外链可以将其添加到歌单、电台中，获取外链</p>
<p>auto 表示是否自动播放</p>
<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">iframe</span> <span class="attr">frameborder</span>=<span class="string">"no"</span> <span class="attr">border</span>=<span class="string">"0"</span> <span class="attr">marginwidth</span>=<span class="string">"0"</span> <span class="attr">marginheight</span>=<span class="string">"0"</span> <span class="attr">width</span>=<span class="string">330</span> <span class="attr">height</span>=<span class="string">86</span> <span class="attr">src</span>=<span class="string">"//music.163.com/outchain/player?type=2&amp;id=4993317&amp;auto=1&amp;height=66"</span>&gt;</span><span class="tag">&lt;/<span class="name">iframe</span>&gt;</span></span><br></pre></td></tr></table></figure>
</blockquote>
</li>
<li><p>引入播放器代码</p>
<p>  在<code>themes/yilia/layout/_partial/left-col.ejs</code>文件<code>nav</code>标签中添加代码</p>
<blockquote>
<p> 注：放在<code>&lt;nav&gt;</code>和<code>&lt;/nav&gt;</code>之内</p>
<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment">&lt;!-- 网易云音乐插件 --&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">%</span> <span class="attr">if</span> (<span class="attr">theme.music</span> &amp;&amp; <span class="attr">theme.music.enable</span>)&#123; %&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">div</span> <span class="attr">style</span>=<span class="string">"position:absolute; bottom:120px left:auto; width:85%"</span>&gt;</span></span><br><span class="line">       <span class="tag">&lt;<span class="name">iframe</span> <span class="attr">frameborder</span>=<span class="string">"no"</span> <span class="attr">border</span>=<span class="string">"0"</span> <span class="attr">marginwidth</span>=<span class="string">"0"</span> <span class="attr">marginheight</span>=<span class="string">"0"</span> <span class="attr">width</span>=<span class="string">228</span> <span class="attr">height</span>=<span class="string">52</span> <span class="attr">src</span>=<span class="string">"//music.163.com/outchain/player?type=4&amp;id=349623778&amp;auto=0&amp;height=32"</span>&gt;</span><span class="tag">&lt;/<span class="name">iframe</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;/<span class="name">div</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">%</span> &#125; %&gt;</span></span><br></pre></td></tr></table></figure>

<p> 通过设置marginheight=”0” width=330 height=110 来改变大小，美化界面</p>
</blockquote>
</li>
<li><p>在yilia主题配置文件<code>_config.yml</code>中添加属性</p>
<blockquote>
<figure class="highlight yml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># 网易云音乐插件</span></span><br><span class="line"><span class="attr">music:</span></span><br><span class="line">  <span class="attr">enable:</span> <span class="literal">true</span></span><br><span class="line">  <span class="comment">#id: 1332647902  # 网易云分享的ID</span></span><br><span class="line">  <span class="attr">autoplay:</span> <span class="literal">false</span>  <span class="comment"># 是否开启自动播放</span></span><br></pre></td></tr></table></figure>
</blockquote>
</li>
</ul>
<h4 id="9-3-遗留问题-未解决"><a href="#9-3-遗留问题-未解决" class="headerlink" title="9.3 遗留问题(未解决)"></a>9.3 遗留问题(未解决)</h4><ul>
<li><p><strong>歌单外链错误 : music.163.com上的嵌入式页面显示资源加载失败</strong></p>
<blockquote>
<p>单首音乐对象直接生成外链、电台对象生成外链均不会出现资源加载失败问题；</p>
<p>但是，使用歌单对象(即使歌单只有一首音乐)，会出现资源加载失败错问题；</p>
<p>推测可能是歌单后台有bug，已反馈给网易云客服。</p>
</blockquote>
</li>
<li><p><a href="https://blog.csdn.net/hubaoquanu/article/details/79084193" target="_blank" rel="noopener">解决办法</a></p>
<ul>
<li><p>原因：是由于开启了IPv6后使用了google的IPv6 DNS，音乐资源网站ip解析会直接错误解析到本地127.0.0.1</p>
</li>
<li><p>方法(均无效)：</p>
<ul>
<li><p>添加以下内容到hosts文件C:\Windows\System32\drivers\etc\hosts</p>
<blockquote>
<figure class="highlight"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># 解决ipv6开启后网易云音乐无法播放的问题</span></span><br><span class="line">111.19.136.246 m10.music.126.net</span><br><span class="line">111.20.255.169 p1.music.126.net</span><br><span class="line">223.252.199.66 music.163.com</span><br></pre></td></tr></table></figure>
</blockquote>
<p>直接停用IPv6功能，在网络和共享中心—网络状态—属性里面，不勾选TCP/IPv6。</p>
</li>
<li><p>使用国内的IPv6DNS: 240c::6666，此时无法访问Google和Youtube。</p>
</li>
</ul>
</li>
</ul>
</li>
</ul>
<hr>
<h3 id="10-文章加密功能"><a href="#10-文章加密功能" class="headerlink" title="10. 文章加密功能"></a>10. 文章加密功能</h3><blockquote>
<p>文章加密一般有两种方式：</p>
<p>1.Nginx授权访问；</p>
<p>2.Hexo-Blog-Encrypt；</p>
<p>由于Nginx授权访问的前置条件是：Hexo博客搭在Nginx服务器；这里用Encrypt插件实现加密</p>
</blockquote>
<h4 id="10-1-引入加密插件"><a href="#10-1-引入加密插件" class="headerlink" title="10.1 引入加密插件"></a>10.1 引入加密插件</h4><ul>
<li><p>安装加密插件Encrypt</p>
<blockquote>
<p>找到博客根目录下的<code>package.json</code>,最下面添加</p>
<figure class="highlight"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">"hexo-blog-encrypt": "2.0.*"</span><br></pre></td></tr></table></figure>

<p>注意：添加时要记得给前一项加上  <strong>,</strong></p>
</blockquote>
</li>
<li><p>进入博客根目录，Git bash，安装</p>
<blockquote>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">npm install</span><br><span class="line"><span class="comment"># 或者</span></span><br><span class="line">cnpm</span><br></pre></td></tr></table></figure>
</blockquote>
</li>
</ul>
<h4 id="10-2-修改配置"><a href="#10-2-修改配置" class="headerlink" title="10.2 修改配置"></a>10.2 修改配置</h4><ul>
<li><p>找到根目录下的<code>_config.yml</code>文件，添加</p>
<blockquote>
<figure class="highlight yml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># Security</span></span><br><span class="line"><span class="comment">#</span></span><br><span class="line"><span class="attr">encrypt:</span></span><br><span class="line">    <span class="attr">enable:</span> <span class="literal">true</span></span><br></pre></td></tr></table></figure>
</blockquote>
</li>
</ul>
<h4 id="10-3-修改MD文章开头属性"><a href="#10-3-修改MD文章开头属性" class="headerlink" title="10.3 修改MD文章开头属性"></a>10.3 修改MD文章开头属性</h4><ul>
<li><p>在需要加密的文章.md文件开头写入</p>
<blockquote>
<p>password: 这里填密码<br>abstract: 这里是博客简述(可见)<br>message: 输入密码提示语句</p>
<figure class="highlight yml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br></pre></td><td class="code"><pre><span class="line"><span class="meta">---</span></span><br><span class="line"><span class="attr">title:</span> <span class="string">加密文章</span></span><br><span class="line"><span class="attr">date:</span> <span class="number">2019</span><span class="number">-05</span><span class="number">-30</span> <span class="number">22</span><span class="string">:02:07</span></span><br><span class="line"><span class="attr">password:</span> <span class="string">这里填密码</span></span><br><span class="line"><span class="attr">abstract:</span> <span class="string">这里是博客简述（能被访客看见）</span></span><br><span class="line"><span class="attr">message:</span> <span class="string">输入密码提示语句（例如：请输入密码）</span></span><br><span class="line"><span class="meta">---</span></span><br></pre></td></tr></table></figure>
</blockquote>
</li>
</ul>
<hr>
<h3 id="11-版权信息功能"><a href="#11-版权信息功能" class="headerlink" title="11. 版权信息功能"></a>11. 版权信息功能</h3><blockquote>
<p>这里介绍两种添加版权信息的方式，其实两者区别不大，一种直接在articles.ejs里面添加版权信息，另一种是把版权信息单独卸载一个ejs文件declare.ejs内。</p>
</blockquote>
<h4 id="11-1-直接修改版"><a href="#11-1-直接修改版" class="headerlink" title="11.1 直接修改版"></a>11.1 直接修改版</h4><blockquote>
<p>参考：<a href="http://dongshuyan.com/2019/05/24/hexo%E5%8D%9A%E5%AE%A2%E6%B3%A8%E6%84%8F%E4%BA%8B%E9%A1%B9/#4-%E6%80%8E%E4%B9%88%E7%BD%AE%E9%A1%B6%E6%96%87%E7%AB%A0" target="_blank" rel="noopener">添加版权信息</a></p>
</blockquote>
<ul>
<li><p>修改文件<code>themes/yilia/layout/_partial/article.ejs</code></p>
<blockquote>
<p>代码添加的位置——此处第11行</p>
<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br></pre></td><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">div</span> <span class="attr">class</span>=<span class="string">"article-entry"</span> <span class="attr">itemprop</span>=<span class="string">"articleBody"</span>&gt;</span></span><br><span class="line">  <span class="tag">&lt;<span class="name">%</span> <span class="attr">if</span> (<span class="attr">post.excerpt</span> &amp;&amp; <span class="attr">index</span>)&#123; %&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">%-</span> <span class="attr">post.excerpt</span> %&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">%</span> <span class="attr">if</span> (<span class="attr">theme.excerpt_link</span>) &#123; %&gt;</span></span><br><span class="line">      <span class="tag">&lt;<span class="name">a</span> <span class="attr">class</span>=<span class="string">"article-more-a"</span> <span class="attr">href</span>=<span class="string">"&lt;%- url_for(post.path) %&gt;#more"</span>&gt;</span><span class="tag">&lt;<span class="name">%=</span> <span class="attr">theme.excerpt_link</span> %&gt;</span> &gt;&gt;<span class="tag">&lt;/<span class="name">a</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">%</span> &#125; %&gt;</span></span><br><span class="line">  <span class="tag">&lt;<span class="name">%</span> &#125; <span class="attr">else</span> &#123; %&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">%-</span> <span class="attr">post.content</span> %&gt;</span></span><br><span class="line">  <span class="tag">&lt;<span class="name">%</span> &#125; %&gt;</span></span><br><span class="line">   </span><br><span class="line">  <span class="tag">&lt;<span class="name">--</span> 在此处添加代码<span class="attr">--</span>&gt;</span></span><br><span class="line">      </span><br><span class="line">  <span class="tag">&lt;<span class="name">%</span> <span class="attr">if</span> ((<span class="attr">theme.reward_type</span> === <span class="string">2</span> || (<span class="attr">theme.reward_type</span> === <span class="string">1</span> &amp;&amp; <span class="attr">post.reward</span>)) &amp;&amp; !<span class="attr">index</span>)&#123; %&gt;</span></span><br><span class="line">  <span class="tag">&lt;<span class="name">div</span> <span class="attr">class</span>=<span class="string">"page-reward"</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">a</span> <span class="attr">href</span>=<span class="string">"javascript:;"</span> <span class="attr">class</span>=<span class="string">"page-reward-btn tooltip-top"</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">div</span> <span class="attr">class</span>=<span class="string">"tooltip tooltip-east"</span>&gt;</span></span><br></pre></td></tr></table></figure>

<p>添加</p>
<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment">&lt;!-- 《添加版权声明 --&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">%</span></span></span><br><span class="line"><span class="tag">  <span class="attr">var</span> <span class="attr">sUrl</span> = <span class="string">url.replace(/index\.html$/,</span> '');</span></span><br><span class="line"><span class="tag">  <span class="attr">sUrl</span> = <span class="string">/^(http:|https:)\/\//.test(sUrl)</span> ? <span class="attr">sUrl</span> <span class="attr">:</span> '<span class="attr">https:</span>' + <span class="attr">sUrl</span>;</span></span><br><span class="line"><span class="tag">%&gt;</span></span><br><span class="line"></span><br><span class="line"><span class="comment">&lt;!-- #版权基础设定：0-关闭声明； 1-文章对应的md文件里有declare: true属性，才有版权声明； 2-所有文章均有版权声明 --&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">%</span> <span class="attr">if</span> ((<span class="attr">theme.declare.declare_type</span> === <span class="string">2</span> || (<span class="attr">theme.declare.declare_type</span> === <span class="string">1</span> &amp;&amp; <span class="attr">post.declare</span>)) &amp;&amp; !<span class="attr">index</span>)&#123; %&gt;</span></span><br><span class="line">  <span class="tag">&lt;<span class="name">div</span> <span class="attr">class</span>=<span class="string">"declare"</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">strong</span> <span class="attr">class</span>=<span class="string">"author"</span>&gt;</span>本文作者：<span class="tag">&lt;/<span class="name">strong</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">%</span> <span class="attr">if</span>(<span class="attr">config.author</span> != <span class="string">undefined)&#123;</span> %&gt;</span></span><br><span class="line">      <span class="tag">&lt;<span class="name">%=</span> <span class="attr">config.author</span>%&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">%</span> &#125;<span class="attr">else</span>&#123;%&gt;</span></span><br><span class="line">      <span class="tag">&lt;<span class="name">font</span> <span class="attr">color</span>=<span class="string">"red"</span>&gt;</span>请在博客根目录“_config.yml”中填入正确的“author”<span class="tag">&lt;/<span class="name">font</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">%&#125;%</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">br</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">strong</span> <span class="attr">class</span>=<span class="string">"create-time"</span>&gt;</span>发布时间：<span class="tag">&lt;/<span class="name">strong</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">%-</span> <span class="attr">date</span>(<span class="attr">post.date</span>, '<span class="attr">YYYY-MM-DD</span> <span class="attr">HH:mm:ss</span>') %&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">br</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">strong</span> <span class="attr">class</span>=<span class="string">"update-time"</span>&gt;</span>最后更新：<span class="tag">&lt;/<span class="name">strong</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">%-</span> <span class="attr">date</span>(<span class="attr">post.updated</span>, '<span class="attr">YYYY-MM-DD</span> <span class="attr">HH:mm:ss</span>') %&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">br</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">strong</span> <span class="attr">class</span>=<span class="string">"article-titles"</span>&gt;</span>本文标题：<span class="tag">&lt;/<span class="name">strong</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">a</span> <span class="attr">href</span>=<span class="string">"&lt;%= config.url%&gt;/&lt;%= post.path %&gt;"</span> <span class="attr">title</span>=<span class="string">"&lt;%= post.title %&gt;"</span> <span class="attr">target</span>=<span class="string">"_blank"</span>&gt;</span><span class="tag">&lt;<span class="name">%=</span> <span class="attr">post.title</span> %&gt;</span><span class="tag">&lt;/<span class="name">a</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">br</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">strong</span> <span class="attr">class</span>=<span class="string">"article-url"</span>&gt;</span>本文链接：<span class="tag">&lt;/<span class="name">strong</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">a</span> <span class="attr">href</span>=<span class="string">"&lt;%=config.url%&gt;/&lt;%= post.path  %&gt;"</span> <span class="attr">title</span>=<span class="string">"&lt;%= post.title %&gt;"</span> <span class="attr">target</span>=<span class="string">"_blank"</span>&gt;</span><span class="tag">&lt;<span class="name">%=</span> <span class="attr">config.url</span>%&gt;</span>/<span class="tag">&lt;<span class="name">%=</span> <span class="attr">page.path</span> %&gt;</span><span class="tag">&lt;/<span class="name">a</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">br</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">strong</span> <span class="attr">class</span>=<span class="string">"copyright"</span>&gt;</span>版权声明：<span class="tag">&lt;/<span class="name">strong</span>&gt;</span></span><br><span class="line">    本作品采用</span><br><span class="line">    <span class="tag">&lt;<span class="name">a</span> <span class="attr">rel</span>=<span class="string">"license"</span> <span class="attr">href</span>=<span class="string">"&lt;%= theme.declare.licensee_url%&gt;"</span> <span class="attr">title</span>=<span class="string">"&lt;%= theme.declare.licensee_alias %&gt;"</span>&gt;</span><span class="tag">&lt;<span class="name">%=</span> <span class="attr">theme.declare.licensee_name</span>%&gt;</span><span class="tag">&lt;/<span class="name">a</span>&gt;</span></span><br><span class="line">    许可协议进行许可。转载请注明作者和出处！</span><br><span class="line">    <span class="tag">&lt;<span class="name">%</span> <span class="attr">if</span>(<span class="attr">theme.declare.licensee_img</span> != <span class="string">undefined)&#123;</span> %&gt;</span></span><br><span class="line">      <span class="tag">&lt;<span class="name">br</span>&gt;</span></span><br><span class="line">      <span class="tag">&lt;<span class="name">a</span> <span class="attr">rel</span>=<span class="string">"license"</span> <span class="attr">href</span>=<span class="string">"&lt;%= theme.declare.licensee_url%&gt;"</span>&gt;</span><span class="tag">&lt;<span class="name">img</span> <span class="attr">alt</span>=<span class="string">"知识共享许可协议"</span> <span class="attr">style</span>=<span class="string">"border-width:0"</span> <span class="attr">src</span>=<span class="string">"&lt;%= theme.declare.licensee_img%&gt;"</span>/&gt;</span><span class="tag">&lt;/<span class="name">a</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">%</span> &#125; %&gt;</span></span><br><span class="line">  <span class="tag">&lt;/<span class="name">div</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">%</span> &#125; <span class="attr">else</span> &#123;%&gt;</span></span><br><span class="line">  <span class="tag">&lt;<span class="name">div</span> <span class="attr">class</span>=<span class="string">"declare"</span> <span class="attr">hidden</span>=<span class="string">"hidden"</span>&gt;</span><span class="tag">&lt;/<span class="name">div</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">%</span> &#125; %&gt;</span></span><br><span class="line"><span class="comment">&lt;!-- 添加版权声明》 --&gt;</span></span><br></pre></td></tr></table></figure>
</blockquote>
</li>
<li><p>创建新文件<code>declare.scss</code></p>
<blockquote>
<p>路径：<code>themes/yilia/source-src/css/declare.scss</code></p>
<p>添加css</p>
<figure class="highlight css"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br></pre></td><td class="code"><pre><span class="line"><span class="selector-class">.declare</span> &#123;</span><br><span class="line">    <span class="attribute">background-color</span>: <span class="number">#eaeaea</span>;</span><br><span class="line">    <span class="attribute">margin-top</span>: <span class="number">2em</span>;</span><br><span class="line">    <span class="attribute">border-left</span>: <span class="number">3px</span> solid <span class="number">#ff1700</span>;</span><br><span class="line">    <span class="attribute">padding</span>: .<span class="number">5em</span> <span class="number">1em</span>;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
</blockquote>
</li>
<li><p>修改文件<code>themes/yilia/source-src/css/main.scss</code></p>
<blockquote>
<figure class="highlight css"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">@import</span> <span class="string">"./declare"</span>;</span><br></pre></td></tr></table></figure>
</blockquote>
</li>
<li><p>修改主题配置文件<code>themes/yilia/_config.yml</code></p>
<blockquote>
<figure class="highlight yml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># 版权声明</span></span><br><span class="line"><span class="comment">#在需要进行版权声明的文章的md文件头部，设置属性declare: true。</span></span><br><span class="line"><span class="comment">#版权基础设定：0-关闭声明； 1-文章对应的md文件里有declare: true属性，才有版权声明； 2-所有文章均有版权声明</span></span><br><span class="line"><span class="attr">declare:</span></span><br><span class="line">  <span class="attr">declare_type:</span> <span class="number">1</span></span><br><span class="line">  <span class="attr">licensee_url:</span> <span class="string">https://creativecommons.org/licenses/by-nc-sa/4.0/</span>        <span class="comment">#当前应用的版权协议地址。</span></span><br><span class="line">  <span class="attr">licensee_name:</span> <span class="string">'CC BY-NC-SA 4.0'</span>                                        <span class="comment">#版权协议的名称</span></span><br><span class="line">  <span class="attr">licensee_alias:</span> <span class="string">'知识共享署名-非商业性使用-相同方式共享 4.0 国际许可协议'</span>       <span class="comment"># alias别名</span></span><br><span class="line">  <span class="attr">licensee_img:</span> <span class="string">https://i.creativecommons.org/l/by-nc-sa/4.0/88x31.png</span>    <span class="comment">#版权协议的Logo</span></span><br></pre></td></tr></table></figure>
</blockquote>
</li>
<li><p>然后在需要进行版权声明的文章的md文件头部，设置属性declare</p>
<blockquote>
<figure class="highlight yml"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><span class="string">declare:true</span></span><br></pre></td></tr></table></figure>
</blockquote>
</li>
</ul>
<h4 id="11-2-新建文件版"><a href="#11-2-新建文件版" class="headerlink" title="11.2 新建文件版"></a>11.2 新建文件版</h4><blockquote>
<p>参考：<a href="https://blog.csdn.net/qq_40922859/article/details/97035497?utm_medium=distribute.pc_relevant.none-task-blog-BlogCommendFromMachineLearnPai2-2.channel_param&depth_1-utm_source=distribute.pc_relevant.none-task-blog-BlogCommendFromMachineLearnPai2-2.channel_param" target="_blank" rel="noopener">添加版权信息</a></p>
</blockquote>
<ul>
<li><p>新建文件<code>declare.ejs</code></p>
<blockquote>
<p>路径：<code>\themes\yilia\layout\_partial\post\</code></p>
<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment">&lt;!-- 《添加版权声明 --&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">%</span></span></span><br><span class="line"><span class="tag">  <span class="attr">var</span> <span class="attr">sUrl</span> = <span class="string">url.replace(/index\.html$/,</span> '');</span></span><br><span class="line"><span class="tag">  <span class="attr">sUrl</span> = <span class="string">/^(http:|https:)\/\//.test(sUrl)</span> ? <span class="attr">sUrl</span> <span class="attr">:</span> '<span class="attr">https:</span>' + <span class="attr">sUrl</span>;</span></span><br><span class="line"><span class="tag">%&gt;</span></span><br><span class="line"></span><br><span class="line"><span class="comment">&lt;!-- #版权基础设定：0-关闭声明； 1-文章对应的md文件里有declare: true属性，才有版权声明； 2-所有文章均有版权声明 --&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">%</span> <span class="attr">if</span> ((<span class="attr">theme.declare.declare_type</span> === <span class="string">2</span> || (<span class="attr">theme.declare.declare_type</span> === <span class="string">1</span> &amp;&amp; <span class="attr">post.declare</span>)) &amp;&amp; !<span class="attr">index</span>)&#123; %&gt;</span></span><br><span class="line">  <span class="tag">&lt;<span class="name">div</span> <span class="attr">class</span>=<span class="string">"declare"</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">strong</span> <span class="attr">class</span>=<span class="string">"author"</span>&gt;</span>本文作者：<span class="tag">&lt;/<span class="name">strong</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">%</span> <span class="attr">if</span>(<span class="attr">config.author</span> != <span class="string">undefined)&#123;</span> %&gt;</span></span><br><span class="line">      <span class="tag">&lt;<span class="name">%=</span> <span class="attr">config.author</span>%&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">%</span> &#125;<span class="attr">else</span>&#123;%&gt;</span></span><br><span class="line">      <span class="tag">&lt;<span class="name">font</span> <span class="attr">color</span>=<span class="string">"red"</span>&gt;</span>请在博客根目录“_config.yml”中填入正确的“author”<span class="tag">&lt;/<span class="name">font</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">%&#125;%</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">br</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">strong</span> <span class="attr">class</span>=<span class="string">"create-time"</span>&gt;</span>发布时间：<span class="tag">&lt;/<span class="name">strong</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">%-</span> <span class="attr">date</span>(<span class="attr">post.date</span>, '<span class="attr">YYYY-MM-DD</span> <span class="attr">HH:mm:ss</span>') %&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">br</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">strong</span> <span class="attr">class</span>=<span class="string">"update-time"</span>&gt;</span>最后更新：<span class="tag">&lt;/<span class="name">strong</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">%-</span> <span class="attr">date</span>(<span class="attr">post.updated</span>, '<span class="attr">YYYY-MM-DD</span> <span class="attr">HH:mm:ss</span>') %&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">br</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">strong</span> <span class="attr">class</span>=<span class="string">"article-titles"</span>&gt;</span>本文标题：<span class="tag">&lt;/<span class="name">strong</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">a</span> <span class="attr">href</span>=<span class="string">"&lt;%= config.url%&gt;/&lt;%= post.path %&gt;"</span> <span class="attr">title</span>=<span class="string">"&lt;%= post.title %&gt;"</span> <span class="attr">target</span>=<span class="string">"_blank"</span>&gt;</span><span class="tag">&lt;<span class="name">%=</span> <span class="attr">post.title</span> %&gt;</span><span class="tag">&lt;/<span class="name">a</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">br</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">strong</span> <span class="attr">class</span>=<span class="string">"article-url"</span>&gt;</span>本文链接：<span class="tag">&lt;/<span class="name">strong</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">a</span> <span class="attr">href</span>=<span class="string">"&lt;%= config.url%&gt;/&lt;%= post.path  %&gt;"</span> <span class="attr">title</span>=<span class="string">"&lt;%= post.title %&gt;"</span> <span class="attr">target</span>=<span class="string">"_blank"</span>&gt;</span><span class="tag">&lt;<span class="name">%=</span> <span class="attr">config.url</span>%&gt;</span>/<span class="tag">&lt;<span class="name">%=</span> <span class="attr">page.path</span> %&gt;</span><span class="tag">&lt;/<span class="name">a</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">br</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">strong</span> <span class="attr">class</span>=<span class="string">"copyright"</span>&gt;</span>版权声明：<span class="tag">&lt;/<span class="name">strong</span>&gt;</span></span><br><span class="line">    本作品采用</span><br><span class="line">    <span class="tag">&lt;<span class="name">a</span> <span class="attr">rel</span>=<span class="string">"license"</span> <span class="attr">href</span>=<span class="string">"&lt;%= theme.declare.licensee_url%&gt;"</span> <span class="attr">title</span>=<span class="string">"&lt;%= theme.declare.licensee_alias %&gt;"</span>&gt;</span><span class="tag">&lt;<span class="name">%=</span> <span class="attr">theme.declare.licensee_name</span>%&gt;</span><span class="tag">&lt;/<span class="name">a</span>&gt;</span></span><br><span class="line">    许可协议进行许可。转载请注明作者和出处！</span><br><span class="line">    <span class="tag">&lt;<span class="name">%</span> <span class="attr">if</span>(<span class="attr">theme.declare.licensee_img</span> != <span class="string">undefined)&#123;</span> %&gt;</span></span><br><span class="line">      <span class="tag">&lt;<span class="name">br</span>&gt;</span></span><br><span class="line">     <span class="comment">&lt;!--版权logo如果加载不出来可以注释掉--&gt;</span></span><br><span class="line">      <span class="tag">&lt;<span class="name">a</span> <span class="attr">rel</span>=<span class="string">"license"</span> <span class="attr">href</span>=<span class="string">"&lt;%= theme.declare.licensee_url%&gt;"</span>&gt;</span><span class="tag">&lt;<span class="name">img</span> <span class="attr">alt</span>=<span class="string">"知识共享许可协议"</span> <span class="attr">style</span>=<span class="string">"border-width:0"</span> <span class="attr">src</span>=<span class="string">"&lt;%= theme.declare.licensee_img%&gt;"</span>/&gt;</span><span class="tag">&lt;/<span class="name">a</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">%</span> &#125; %&gt;</span></span><br><span class="line">  <span class="tag">&lt;/<span class="name">div</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">%</span> &#125; <span class="attr">else</span> &#123;%&gt;</span></span><br><span class="line">  <span class="tag">&lt;<span class="name">div</span> <span class="attr">class</span>=<span class="string">"declare"</span> <span class="attr">hidden</span>=<span class="string">"hidden"</span>&gt;</span><span class="tag">&lt;/<span class="name">div</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">%</span> &#125; %&gt;</span></span><br><span class="line"><span class="comment">&lt;!-- 添加版权声明》 --&gt;</span>     </span><br></pre></td></tr></table></figure>
</blockquote>
</li>
<li><p>修改文件<code>themes\yilia\layout\_partial\article.ejs</code></p>
<blockquote>
<p>添加</p>
<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment">&lt;!-- 《添加版权声明 --&gt;</span></span><br><span class="line">        <span class="tag">&lt;<span class="name">%</span> <span class="attr">if</span>(<span class="attr">theme.declare</span>)&#123;%&gt;</span></span><br><span class="line">            <span class="tag">&lt;<span class="name">%-</span> <span class="attr">partial</span>('<span class="attr">post</span>/<span class="attr">declare</span>') %&gt;</span></span><br><span class="line">        <span class="tag">&lt;<span class="name">%</span> &#125; %&gt;</span></span><br><span class="line"><span class="comment">&lt;!-- 添加版权声明》 --&gt;</span></span><br></pre></td></tr></table></figure>
</blockquote>
</li>
<li><p>修改文件<code>\themes\yilia\source\main.xxxxx.css</code></p>
<blockquote>
<p>在底部添加</p>
<figure class="highlight css"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment">/* 版权声明 */</span></span><br><span class="line"><span class="selector-class">.declare</span> &#123;</span><br><span class="line">	<span class="attribute">background-color</span>: <span class="number">#eaeaea</span>;</span><br><span class="line">	<span class="attribute">margin-top</span>: <span class="number">2em</span>;</span><br><span class="line">	<span class="attribute">border-left</span>: <span class="number">3px</span> solid <span class="number">#ff1700</span>;</span><br><span class="line">	<span class="attribute">padding</span>: .<span class="number">5em</span> <span class="number">1em</span>;</span><br><span class="line">&#125;</span><br><span class="line"><span class="selector-tag">ul</span><span class="selector-class">.declare</span> <span class="selector-tag">li</span> &#123;</span><br><span class="line">    <span class="attribute">font-size</span>: <span class="number">19px</span>;</span><br><span class="line">    <span class="attribute">font-weight</span>: bold;</span><br><span class="line">    <span class="attribute">line-height</span>: <span class="number">1.5</span>;</span><br><span class="line">&#125;</span><br><span class="line"><span class="comment">/* 版权声明移动端 */</span></span><br><span class="line"><span class="keyword">@media</span> screen <span class="keyword">and</span> (<span class="attribute">max-width:</span><span class="number">800px</span>)&#123;</span><br><span class="line">	<span class="selector-tag">li</span><span class="selector-class">.declare_article-url</span>&#123;</span><br><span class="line">		<span class="attribute">display</span>: none;</span><br><span class="line">	&#125;</span><br><span class="line">  <span class="selector-tag">ul</span><span class="selector-class">.declare</span> <span class="selector-tag">li</span>&#123;</span><br><span class="line">		<span class="attribute">font-weight</span>: normal;</span><br><span class="line">		<span class="attribute">font-size</span>: <span class="number">16px</span>;</span><br><span class="line">	&#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
</blockquote>
</li>
<li><p>修改主题配置文件<code>\themes\yilia\_config.yml</code>:</p>
<blockquote>
<p>添加</p>
<figure class="highlight yml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># 版权声明</span></span><br><span class="line"><span class="comment">#在需要进行版权声明的文章的md文件头部，设置属性declare: true。</span></span><br><span class="line"><span class="comment">#版权基础设定：0-关闭声明； 1-文章对应的md文件里有declare: true属性，才有版权声明； 2-所有文章均有版权声明</span></span><br><span class="line"><span class="attr">declare:</span></span><br><span class="line">  <span class="attr">declare_type:</span> <span class="number">1</span></span><br><span class="line">  <span class="attr">licensee_url:</span> <span class="string">https://creativecommons.org/licenses/by-nc-sa/4.0/</span>        <span class="comment">#当前应用的版权协议地址。</span></span><br><span class="line">  <span class="attr">licensee_name:</span> <span class="string">'CC BY-NC-SA 4.0'</span>                                        <span class="comment">#版权协议的名称</span></span><br><span class="line">  <span class="attr">licensee_alias:</span> <span class="string">'知识共享署名-非商业性使用-相同方式共享 4.0 国际许可协议'</span>       <span class="comment"># alias别名</span></span><br><span class="line">  <span class="attr">licensee_img:</span> <span class="string">https://i.creativecommons.org/l/by-nc-sa/4.0/88x31.png</span>    <span class="comment">#版权协议的Logo</span></span><br></pre></td></tr></table></figure>
</blockquote>
</li>
<li><p>在需要进行版权声明的文章的md文件头部，设置属性copyright</p>
<blockquote>
<figure class="highlight yml"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><span class="attr">declare:</span> <span class="literal">true</span></span><br></pre></td></tr></table></figure>
</blockquote>
</li>
<li><p>注意：</p>
<ul>
<li><p>第二种方法中，没有新建declare.sccs文件，而是直接将版权信息的显示格式设置放在了<code>\themes\yilia\source\main.xxxxx.css</code>中；</p>
</li>
<li><p>版权协议的Logo所在网址需要人机验证，所以获取不到Logo时可以手动登录<a href="https://i.creativecommons.org/l/by-nc-sa/4.0/88x31.png" target="_blank" rel="noopener">协议Logo</a>进行验证，从而使得Logo可以被获取；</p>
</li>
<li><p>一些属性定义</p>
<ul>
<li><code>page</code>和<code>post</code>基本一致</li>
</ul>
<ul>
<li><strong>theme.author</strong> ： 作者名</li>
<li><strong>post.title</strong> ：文章标题</li>
<li><strong>post.path</strong>　：文章相对路径</li>
<li><strong>post.permalink</strong> : 文章绝对路径</li>
<li><strong>post.date</strong> : 日期</li>
</ul>
</li>
</ul>
</li>
</ul>
<hr>
<h3 id="12-爱心、光玉特效功能"><a href="#12-爱心、光玉特效功能" class="headerlink" title="12. 爱心、光玉特效功能"></a>12. 爱心、光玉特效功能</h3><ul>
<li><a href="https://yansheng836.github.io/article/cf9c6a5e.html#%E5%8A%A8%E6%80%81%E7%BA%BF%E6%9D%A1%E8%83%8C%E6%99%AF" target="_blank" rel="noopener">特效大全</a></li>
<li>爱心、雪花、动态线条、文字、彩带等特效</li>
</ul>
<h4 id="12-1-点击爱心"><a href="#12-1-点击爱心" class="headerlink" title="12.1 点击爱心"></a>12.1 点击爱心</h4><ul>
<li><p>新建js文件：\yilia\source\路径下新建<code>clicklove.js</code>,内容如下</p>
<blockquote>
<p><code>clicklove.js</code></p>
<figure class="highlight js"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br><span class="line">44</span><br><span class="line">45</span><br></pre></td><td class="code"><pre><span class="line">! <span class="function"><span class="keyword">function</span> (<span class="params">e, t, a</span>) </span>&#123;</span><br><span class="line">    <span class="function"><span class="keyword">function</span> <span class="title">n</span>(<span class="params"></span>) </span>&#123;</span><br><span class="line">        c(<span class="string">".heart&#123;width: 10px;height: 10px;position: fixed;background: #f00;transform: rotate(45deg);-webkit-transform: rotate(45deg);-moz-transform: rotate(45deg);&#125;.heart:after,.heart:before&#123;content: '';width: inherit;height: inherit;background: inherit;border-radius: 50%;-webkit-border-radius: 50%;-moz-border-radius: 50%;position: fixed;&#125;.heart:after&#123;top: -5px;&#125;.heart:before&#123;left: -5px;&#125;"</span>), o(), r()</span><br><span class="line">    &#125;</span><br><span class="line">    <span class="function"><span class="keyword">function</span> <span class="title">r</span>(<span class="params"></span>) </span>&#123;</span><br><span class="line">        <span class="keyword">for</span> (<span class="keyword">var</span> e = <span class="number">0</span>; e &lt; d.length; e++) d[e].alpha &lt;= <span class="number">0</span> ? (t.body.removeChild(d[e].el), d.splice(e, <span class="number">1</span>)) : (d[e].y--, d[e].scale += <span class="number">.004</span>, d[e].alpha -= <span class="number">.013</span>, d[e].el.style.cssText = <span class="string">"left:"</span> + d[e].x + <span class="string">"px;top:"</span> + d[e].y + <span class="string">"px;opacity:"</span> + d[e].alpha + <span class="string">";transform:scale("</span> + d[e].scale + <span class="string">","</span> + d[e].scale + <span class="string">") rotate(45deg);background:"</span> + d[e].color + <span class="string">";z-index:99999"</span>);</span><br><span class="line">        requestAnimationFrame(r)</span><br><span class="line">    &#125;</span><br><span class="line">    <span class="function"><span class="keyword">function</span> <span class="title">o</span>(<span class="params"></span>) </span>&#123;</span><br><span class="line">        <span class="keyword">var</span> t = <span class="string">"function"</span> == <span class="keyword">typeof</span> e.onclick &amp;&amp; e.onclick;</span><br><span class="line">        e.onclick = <span class="function"><span class="keyword">function</span> (<span class="params">e</span>) </span>&#123;</span><br><span class="line">            t &amp;&amp; t(), i(e)</span><br><span class="line">        &#125;</span><br><span class="line">    &#125;</span><br><span class="line">    <span class="function"><span class="keyword">function</span> <span class="title">i</span>(<span class="params">e</span>) </span>&#123;</span><br><span class="line">        <span class="keyword">var</span> a = t.createElement(<span class="string">"div"</span>);</span><br><span class="line">        a.className = <span class="string">"heart"</span>, d.push(&#123;</span><br><span class="line">            el: a,</span><br><span class="line">            x: e.clientX - <span class="number">5</span>,</span><br><span class="line">            y: e.clientY - <span class="number">5</span>,</span><br><span class="line">            scale: <span class="number">1</span>,</span><br><span class="line">            alpha: <span class="number">1</span>,</span><br><span class="line">            color: s()</span><br><span class="line">        &#125;), t.body.appendChild(a)</span><br><span class="line">    &#125;</span><br><span class="line">    <span class="function"><span class="keyword">function</span> <span class="title">c</span>(<span class="params">e</span>) </span>&#123;</span><br><span class="line">        <span class="keyword">var</span> a = t.createElement(<span class="string">"style"</span>);</span><br><span class="line">        a.type = <span class="string">"text/css"</span>;</span><br><span class="line">        <span class="keyword">try</span> &#123;</span><br><span class="line">            a.appendChild(t.createTextNode(e))</span><br><span class="line">        &#125; <span class="keyword">catch</span> (t) &#123;</span><br><span class="line">            a.styleSheet.cssText = e</span><br><span class="line">        &#125;</span><br><span class="line">        t.getElementsByTagName(<span class="string">"head"</span>)[<span class="number">0</span>].appendChild(a)</span><br><span class="line">    &#125;</span><br><span class="line">    <span class="function"><span class="keyword">function</span> <span class="title">s</span>(<span class="params"></span>) </span>&#123;</span><br><span class="line">        <span class="keyword">return</span> <span class="string">"rgb("</span> + ~~(<span class="number">255</span> * <span class="built_in">Math</span>.random()) + <span class="string">","</span> + ~~(<span class="number">255</span> * <span class="built_in">Math</span>.random()) + <span class="string">","</span> + ~~(<span class="number">255</span> * <span class="built_in">Math</span>.random()) + <span class="string">")"</span></span><br><span class="line">    &#125;</span><br><span class="line">    <span class="keyword">var</span> d = [];</span><br><span class="line">    e.requestAnimationFrame = <span class="function"><span class="keyword">function</span> (<span class="params"></span>) </span>&#123;</span><br><span class="line">        <span class="keyword">return</span> e.requestAnimationFrame || e.webkitRequestAnimationFrame || e.mozRequestAnimationFrame || e.oRequestAnimationFrame || e.msRequestAnimationFrame || <span class="function"><span class="keyword">function</span> (<span class="params">e</span>) </span>&#123;</span><br><span class="line">            setTimeout(e, <span class="number">1e3</span> / <span class="number">60</span>)</span><br><span class="line">        &#125;</span><br><span class="line">    &#125;(), n()</span><br><span class="line">&#125;(<span class="built_in">window</span>, <span class="built_in">document</span>);</span><br></pre></td></tr></table></figure>
</blockquote>
</li>
<li><p>修改ejs文件，找到<code>themes\yilia\layout\_partial\after-footer.ejs</code></p>
<blockquote>
<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line"># 添加</span><br><span class="line"><span class="comment">&lt;!--页面点击小红心--&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">script</span> <span class="attr">type</span>=<span class="string">"text/javascript"</span> <span class="attr">src</span>=<span class="string">"/clicklove.js"</span>&gt;</span><span class="tag">&lt;/<span class="name">script</span>&gt;</span></span><br></pre></td></tr></table></figure>

<p>注意：这里的路径要对应之前创建clicklove.ejs的地方</p>
</blockquote>
</li>
</ul>
<h4 id="12-2-光玉特效"><a href="#12-2-光玉特效" class="headerlink" title="12.2 光玉特效"></a>12.2 光玉特效</h4><ul>
<li><p>新建snow.js文件，路径：<code>themes\yilia\source\</code></p>
<blockquote>
<figure class="highlight js"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br><span class="line">44</span><br><span class="line">45</span><br><span class="line">46</span><br><span class="line">47</span><br><span class="line">48</span><br><span class="line">49</span><br><span class="line">50</span><br><span class="line">51</span><br><span class="line">52</span><br><span class="line">53</span><br><span class="line">54</span><br><span class="line">55</span><br><span class="line">56</span><br><span class="line">57</span><br><span class="line">58</span><br><span class="line">59</span><br><span class="line">60</span><br><span class="line">61</span><br><span class="line">62</span><br><span class="line">63</span><br><span class="line">64</span><br><span class="line">65</span><br><span class="line">66</span><br><span class="line">67</span><br><span class="line">68</span><br><span class="line">69</span><br><span class="line">70</span><br><span class="line">71</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">var</span> snow = &#123;</span><br><span class="line">  info: &#123;</span><br><span class="line">    top: <span class="number">0</span>,</span><br><span class="line">    left: <span class="number">0</span>,</span><br><span class="line">    zIndex: <span class="number">500</span>,</span><br><span class="line">    number: <span class="number">70</span></span><br><span class="line">  &#125;,</span><br><span class="line">  down: <span class="function"><span class="keyword">function</span> (<span class="params"></span>) </span>&#123;</span><br><span class="line">    <span class="keyword">var</span> f = <span class="built_in">window</span>.innerWidth;</span><br><span class="line">    <span class="keyword">var</span> g = <span class="built_in">window</span>.innerHeight;</span><br><span class="line">    <span class="keyword">var</span> d = <span class="built_in">document</span>.createElement(<span class="string">"canvas"</span>);</span><br><span class="line">    d.style.position = <span class="string">"fixed"</span>;</span><br><span class="line">    d.style.pointerEvents = <span class="string">"none"</span>;</span><br><span class="line">    d.style.top = snow.info.top + <span class="string">"px"</span>;</span><br><span class="line">    d.style.left = snow.info.left + <span class="string">"px"</span>;</span><br><span class="line">    d.style.zIndex = snow.info.zIndex;</span><br><span class="line">    d.width = f;</span><br><span class="line">    d.height = g;</span><br><span class="line">    <span class="built_in">document</span>.body.appendChild(d);</span><br><span class="line">    <span class="keyword">var</span> c = [];</span><br><span class="line">    <span class="keyword">for</span> (<span class="keyword">var</span> a = <span class="number">0</span>; a &lt; snow.info.number; a++) &#123;</span><br><span class="line">      c.push(&#123;</span><br><span class="line">        x: <span class="built_in">Math</span>.random() * f,</span><br><span class="line">        y: <span class="built_in">Math</span>.random() * g,</span><br><span class="line">        r: <span class="built_in">Math</span>.random() * <span class="number">4</span> + <span class="number">1</span>,</span><br><span class="line">        n: <span class="built_in">Math</span>.random() * <span class="number">70</span></span><br><span class="line">      &#125;)</span><br><span class="line">    &#125;</span><br><span class="line">    <span class="keyword">var</span> b = d.getContext(<span class="string">"2d"</span>);</span><br><span class="line">    <span class="keyword">var</span> e = <span class="number">0</span>;</span><br><span class="line">    setInterval(<span class="function"><span class="keyword">function</span> (<span class="params"></span>) </span>&#123;</span><br><span class="line">        b.clearRect(<span class="number">0</span>, <span class="number">0</span>, f, g);</span><br><span class="line">        b.fillStyle = <span class="string">"rgba(233,235,154, 1)"</span>;</span><br><span class="line">        b.shadowBlur = <span class="number">5</span>;</span><br><span class="line">        b.shadowColor = <span class="string">"rgba(250,250,210 2)"</span>;</span><br><span class="line">        b.beginPath();</span><br><span class="line">        <span class="keyword">for</span> (<span class="keyword">var</span> j = <span class="number">0</span>; j &lt; <span class="number">70</span>; j++) &#123;</span><br><span class="line">          <span class="keyword">var</span> h = c[j];</span><br><span class="line">          b.moveTo(h.x, h.y);</span><br><span class="line">          b.arc(h.x, h.y, h.r, <span class="number">0</span>, <span class="built_in">Math</span>.PI * <span class="number">2</span>, <span class="number">0</span>)</span><br><span class="line">        &#125;</span><br><span class="line">        b.fill();</span><br><span class="line">        e += <span class="number">0.01</span>;</span><br><span class="line">        <span class="keyword">for</span> (<span class="keyword">var</span> j = <span class="number">0</span>; j &lt; <span class="number">70</span>; j++) &#123;</span><br><span class="line">          <span class="keyword">var</span> h = c[j];</span><br><span class="line">          h.y += <span class="built_in">Math</span>.cos(e + h.n) + h.r / <span class="number">2</span>;</span><br><span class="line">          h.x += <span class="built_in">Math</span>.sin(e) * <span class="number">2</span>;</span><br><span class="line">          <span class="keyword">if</span> (h.x &gt; f + <span class="number">5</span> || h.x &lt; <span class="number">-5</span> || h.y &gt; g) &#123;</span><br><span class="line">            c[j] = j % <span class="number">3</span> &gt; <span class="number">0</span> ? &#123;</span><br><span class="line">              x: <span class="built_in">Math</span>.random() * f,</span><br><span class="line">              y: <span class="number">-10</span>,</span><br><span class="line">              r: h.r,</span><br><span class="line">              n: h.n</span><br><span class="line">            &#125; : <span class="built_in">Math</span>.sin(e) &gt; <span class="number">0</span> ? &#123;</span><br><span class="line">              x: <span class="number">-5</span>,</span><br><span class="line">              y: <span class="built_in">Math</span>.random() * g,</span><br><span class="line">              r: h.r,</span><br><span class="line">              n: h.n</span><br><span class="line">            &#125; : &#123;</span><br><span class="line">              x: f + <span class="number">5</span>,</span><br><span class="line">              y: <span class="built_in">Math</span>.random() * g,</span><br><span class="line">              r: h.r,</span><br><span class="line">              n: h.n</span><br><span class="line">            &#125;</span><br><span class="line">          &#125;</span><br><span class="line">        &#125;</span><br><span class="line">      &#125;,</span><br><span class="line">      <span class="number">15</span>)</span><br><span class="line">  &#125;</span><br><span class="line">&#125;;</span><br><span class="line"><span class="comment">// yilia-plus主题已经集成了，可以直接用</span></span><br></pre></td></tr></table></figure>
</blockquote>
</li>
<li><p>修改<code>themes\yilia\layout\layout.ejs</code>文件</p>
<blockquote>
<p>添加</p>
<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment">&lt;!--雪花特效--&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">%</span> <span class="attr">if</span> (<span class="attr">theme.snow</span>)&#123; %&gt;</span></span><br><span class="line">  <span class="tag">&lt;<span class="name">script</span> <span class="attr">type</span>=<span class="string">"text/javascript"</span> <span class="attr">src</span>=<span class="string">"&lt;%- url_for('snow.js') %&gt;"</span>&gt;</span><span class="tag">&lt;/<span class="name">script</span>&gt;</span></span><br><span class="line">  <span class="tag">&lt;<span class="name">script</span> <span class="attr">type</span>=<span class="string">"text/javascript"</span> <span class="attr">src</span>=<span class="string">"&lt;%- url_for('jquery-2.1.4.min.js') %&gt;"</span>&gt;</span><span class="tag">&lt;/<span class="name">script</span>&gt;</span></span><br><span class="line">  <span class="tag">&lt;<span class="name">script</span>&gt;</span></span><br><span class="line">    snow.down();</span><br><span class="line"><span class="javascript">    $(<span class="built_in">window</span>).resize(<span class="function"><span class="keyword">function</span>(<span class="params"></span>) </span>&#123;</span></span><br><span class="line"><span class="javascript">      $(<span class="string">"canvas"</span>).css(<span class="string">"z-index"</span>,<span class="string">"500"</span>).remove();</span></span><br><span class="line">      snow.down();</span><br><span class="line">    &#125;);</span><br><span class="line">  <span class="tag">&lt;/<span class="name">script</span>&gt;</span></span><br><span class="line">  <span class="tag">&lt;<span class="name">%</span> &#125; %&gt;</span></span><br></pre></td></tr></table></figure>
</blockquote>
</li>
<li><p>修改主题配置文件<code>themes\yilia\_config.yml</code></p>
<blockquote>
<figure class="highlight yml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># 飘雪特效</span></span><br><span class="line"><span class="comment"># https://github.com/MlgmXyysd/snow.js</span></span><br><span class="line"><span class="attr">snow:</span> <span class="literal">true</span></span><br></pre></td></tr></table></figure>
</blockquote>
</li>
</ul>
<hr>
<h3 id="13-SEO优化"><a href="#13-SEO优化" class="headerlink" title="13. SEO优化"></a>13. SEO优化</h3><ul>
<li><p>SEO(Search Engine Optimization)搜索引擎优化</p>
<blockquote>
<p>搜索引擎优化是一种利用搜索引擎的搜索规则来提高目的网站在有关搜索引擎内的排名的方式。</p>
</blockquote>
<ul>
<li>针对个人网站的页面排版进行SEO的优化</li>
<li>针对搜索引擎进行主动的优化</li>
</ul>
</li>
</ul>
<h4 id="13-1-加密文章URL"><a href="#13-1-加密文章URL" class="headerlink" title="13.1 加密文章URL"></a>13.1 加密文章URL</h4><blockquote>
<p>博客默认的地址 <code>网址/年/月/日/文章名</code> 格式不便于搜索引擎抓取，需要进行优化</p>
<p>注意：修改之后旧文章的统计数据(浏览量)会重新计数。</p>
</blockquote>
<ul>
<li><p>安装插件 hexo-abbrlink </p>
<blockquote>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">npm install hexo-abbrlink --save</span><br></pre></td></tr></table></figure>
</blockquote>
</li>
<li><p>修改根目录配置文件_config.yml</p>
<blockquote>
<p>查找</p>
<figure class="highlight yml"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><span class="attr">permalink:</span> <span class="string">:year/:month/:day/:title/</span> </span><br></pre></td></tr></table></figure>

<p>修改</p>
<figure class="highlight yml"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><span class="attr">permalink:</span> <span class="string">post/:abbrlink.html</span></span><br></pre></td></tr></table></figure>

<p>并在下面添加：</p>
<figure class="highlight yml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line"><span class="attr">abbrlink:</span></span><br><span class="line">  <span class="attr">alg:</span> <span class="string">crc32</span>  <span class="comment"># 算法</span></span><br><span class="line">  <span class="attr">rep:</span> <span class="string">hex</span>    <span class="comment"># 进制</span></span><br></pre></td></tr></table></figure>
</blockquote>
</li>
</ul>
<h4 id="13-2-添加站点地图SiteMap"><a href="#13-2-添加站点地图SiteMap" class="headerlink" title="13.2 添加站点地图SiteMap"></a>13.2 添加站点地图SiteMap</h4><ul>
<li><p>安装插件 hexo-generator-sitemap </p>
</li>
<li><p>安装插件 hexo-generator-baidu-sitemap </p>
<blockquote>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">npm install hexo-generator-sitemap --save     //默认的</span><br><span class="line">npm install hexo-generator-baidu-sitemap --save    //百度专属</span><br></pre></td></tr></table></figure>
</blockquote>
</li>
<li><p>重新清理、渲染</p>
<blockquote>
<p>pulic文件夹下会生成一个sitmap.xml文件</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">hexo clean</span><br><span class="line">hexo g</span><br></pre></td></tr></table></figure>
</blockquote>
</li>
<li><p>注意：sitemap 的初衷是给搜索引擎看的，为了提高搜索引擎对自己站点的收录效果，可以：</p>
<ul>
<li>手动到 Google 和百度等搜索引擎提交 sitemap.xml</li>
<li>添加蜘蛛协议 robots，新建robots.txt文件，添加以下文件内容，把robots.txt放在hexo站点的source文件下</li>
</ul>
</li>
</ul>
<h4 id="13-3-注册百度站长平台"><a href="#13-3-注册百度站长平台" class="headerlink" title="13.3 注册百度站长平台"></a>13.3 注册百度站长平台</h4><ul>
<li><p>在百度站长平台添加网站</p>
<blockquote>
<p><a href="https://ziyuan.baidu.com/" target="_blank" rel="noopener">百度搜索资源平台</a>→用户中心→站点管理→添加网站</p>
<p>添加需要管理的网站地址</p>
</blockquote>
</li>
<li><p>验证网站：三种方法——本文选用html标签验证</p>
<ul>
<li><p>文件验证</p>
<blockquote>
<p>将百度验证文件放在网站首页下，即：博客根目录/source下</p>
<p>但是hexo在渲染生成时，会修改html文件，导致验证失败</p>
</blockquote>
</li>
<li><p>html标签验证</p>
<blockquote>
<p>将html验证代码添加到网站首页HTML代码的<head>标签之间</p>
<p>在 根目录/themes/yourtheme/layout/_partial/head.ejs 中添加如下代码:</p>
<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">meta</span> <span class="attr">name</span>=<span class="string">"baidu-site-verification"</span> <span class="attr">content</span>=<span class="string">"RdypQbGwZW"</span> /&gt;</span></span><br></pre></td></tr></table></figure>
</blockquote>
</li>
<li><p>Cname</p>
<blockquote>
<p>将RdypQbGwZW.yoursite使用CNAME解析到ziyuan.baidu.com</p>
</blockquote>
</li>
</ul>
</li>
</ul>
<h4 id="13-4-针对百度搜索引擎的优化"><a href="#13-4-针对百度搜索引擎的优化" class="headerlink" title="13.4 针对百度搜索引擎的优化"></a>13.4 针对百度搜索引擎的优化</h4><ul>
<li><p>提交SiteMap站点地图文件</p>
<blockquote>
<p>转到普通收录，选择自己的站点网址。</p>
<p>自动提交，选择sitemap。按照提示的格式添加自己的sitemap文件</p>
<figure class="highlight yml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line"><span class="string">https://chthollists.github.io/sitemap.xml</span></span><br><span class="line"><span class="string">https://chthollists.github.io/baidusitemap.xml</span></span><br></pre></td></tr></table></figure>
</blockquote>
</li>
<li><p>添加<strong>蜘蛛协议</strong> robots</p>
<blockquote>
<p>新建robots.txt文件，添加以下文件内容，把robots.txt放在hexo站点的source文件下</p>
<figure class="highlight yml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># hexo robots.txt</span></span><br><span class="line"><span class="attr">User-agent:</span> <span class="string">*</span> <span class="attr">Allow:</span> <span class="string">/</span></span><br><span class="line"><span class="attr">Allow:</span> <span class="string">/archives/</span></span><br><span class="line"><span class="attr">Disallow:</span> <span class="string">/vendors/</span></span><br><span class="line"><span class="attr">Disallow:</span> <span class="string">/js/</span></span><br><span class="line"><span class="attr">Disallow:</span> <span class="string">/css/</span></span><br><span class="line"><span class="attr">Disallow:</span> <span class="string">/fonts/</span></span><br><span class="line"><span class="attr">Disallow:</span> <span class="string">/vendors/</span></span><br><span class="line"><span class="attr">Disallow:</span> <span class="string">/fancybox/</span></span><br><span class="line"></span><br><span class="line"><span class="attr">Sitemap:</span> <span class="string">https://chthollists.github.io/sitemap.xml</span></span><br><span class="line"><span class="attr">Sitemap:</span> <span class="string">https://chthollists.github.io/baidusitemap.xml</span></span><br></pre></td></tr></table></figure>

<p>可以在<a href="https://ziyuan.baidu.com/" target="_blank" rel="noopener">百度搜索资源平台</a>验证文件是否生效</p>
</blockquote>
</li>
</ul>
<h4 id="13-5-网站结构自身优化"><a href="#13-5-网站结构自身优化" class="headerlink" title="13.5 网站结构自身优化"></a>13.5 网站结构自身优化</h4><ul>
<li><p>keywords 和 description</p>
<blockquote>
<p>在\scaffolds\post.md中添加如下代码，用于生成的文章中添加关键字和描述。</p>
<figure class="highlight yml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line"><span class="attr">keywords:</span> <span class="comment">#文章关键词，多个关键词用英文逗号隔开</span></span><br><span class="line"><span class="attr">description:</span> <span class="comment">#文章描述，便于搜索引擎用关键词检索</span></span><br></pre></td></tr></table></figure>
</blockquote>
</li>
<li><p>文章地址优化</p>
<blockquote>
<p>参见13.1 加密URL</p>
</blockquote>
</li>
</ul>
<hr>
<h3 id="14-百度推送收录功能"><a href="#14-百度推送收录功能" class="headerlink" title="14. 百度推送收录功能"></a>14. 百度推送收录功能</h3><ul>
<li>除了通过提交SiteMap文件推送网站的地址外，还有自动提交：主动推送、自动推送，手动提交方式。详情参考<a href="https://zhuanlan.zhihu.com/p/100922816" target="_blank" rel="noopener">Hexo实现百度收录</a></li>
<li>由于Github Pages上禁止百度爬虫，所以需要把Hexo博客部署到双线服务器上，选择Coding Pages，详情参考<a href="https://blog.csdn.net/qq_36759224/article/details/100879609" target="_blank" rel="noopener">Hexo双线部署CodingPages</a></li>
<li><a href="http://mfln8n.coding-pages.com/">Hexo博客+Coding Pages</a></li>
</ul>
<h4 id="14-1-新增博客文章页面自动推送"><a href="#14-1-新增博客文章页面自动推送" class="headerlink" title="14.1 新增博客文章页面自动推送"></a>14.1 新增博客文章页面自动推送</h4><ul>
<li><p>修改文件 &lt;博客根目录&gt;/themes/yilia/layout/_partial/article.ejs</p>
<blockquote>
<p>查找</p>
<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">%</span></span></span><br><span class="line"><span class="tag">        <span class="attr">var</span> <span class="attr">sUrl</span> = <span class="string">url.replace(/index\.html$/,</span> '');</span></span><br><span class="line"><span class="tag">        <span class="attr">sUrl</span> = <span class="string">/^(http:|https:)\/\//.test(sUrl)</span> ? <span class="attr">sUrl</span> <span class="attr">:</span> '<span class="attr">https:</span>' + <span class="attr">sUrl</span>;</span></span><br><span class="line"><span class="tag">      %&gt;</span></span><br></pre></td></tr></table></figure>

<p>在<strong>前面</strong>添加</p>
<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br></pre></td><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">!-</span> 百度自动推送方式提交 <span class="attr">--</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">%</span> <span class="attr">if</span> (<span class="attr">1</span>)&#123; %&gt;</span></span><br><span class="line">  <span class="tag">&lt;<span class="name">script</span>&gt;</span></span><br><span class="line"><span class="actionscript">  (<span class="function"><span class="keyword">function</span><span class="params">()</span></span>&#123;</span></span><br><span class="line"><span class="javascript">      <span class="keyword">var</span> bp = <span class="built_in">document</span>.createElement(<span class="string">'script'</span>);</span></span><br><span class="line"><span class="javascript">      <span class="keyword">var</span> curProtocol = <span class="built_in">window</span>.location.protocol.split(<span class="string">':'</span>)[<span class="number">0</span>];</span></span><br><span class="line"><span class="actionscript">      <span class="keyword">if</span> (curProtocol === <span class="string">'https'</span>) &#123;</span></span><br><span class="line"><span class="actionscript">          bp.src = <span class="string">'https://zz.bdstatic.com/linksubmit/push.js'</span>;</span></span><br><span class="line">      &#125;</span><br><span class="line"><span class="actionscript">      <span class="keyword">else</span> &#123;</span></span><br><span class="line"><span class="actionscript">          bp.src = <span class="string">'http://push.zhanzhang.baidu.com/push.js'</span>;</span></span><br><span class="line">      &#125;</span><br><span class="line"><span class="javascript">      <span class="keyword">var</span> s = <span class="built_in">document</span>.getElementsByTagName(<span class="string">"script"</span>)[<span class="number">0</span>];</span></span><br><span class="line">      s.parentNode.insertBefore(bp, s);</span><br><span class="line">  &#125;)();</span><br><span class="line">  <span class="tag">&lt;/<span class="name">script</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">%</span> &#125; %&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">!-</span> 百度自动推送方式提交结束 <span class="attr">--</span>&gt;</span></span><br></pre></td></tr></table></figure>
</blockquote>
</li>
<li><p>注意：只会主自动推送新增博客文章页面，不包括其他页面。</p>
</li>
</ul>
<h4 id="14-2-主动推送"><a href="#14-2-主动推送" class="headerlink" title="14.2 主动推送"></a>14.2 主动推送</h4><blockquote>
<p>主动推送最为快速的提交方式，是被百度收录最快的推送方式。</p>
<p>其实现原理如下：</p>
<p>新链接的产生， hexo generate 会产生一个文本文件，里面包含最新的链接；</p>
<p>新链接的提交， hexo deploy 会从上述文件中读取链接，提交至百度搜索引擎。</p>
</blockquote>
<ul>
<li><p>安装插件 hexo-baidu-url-submi</p>
<blockquote>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">npm install hexo-baidu-url-submit --save</span><br></pre></td></tr></table></figure>
</blockquote>
</li>
<li><p>修改博客根目录配置文件_config.yml</p>
<blockquote>
<p>添加</p>
<figure class="highlight yml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line"><span class="attr">baidu_url_submit:</span></span><br><span class="line">  <span class="attr">count:</span> <span class="number">20</span> <span class="comment">## 提交最新的20个链接</span></span><br><span class="line">  <span class="attr">host:</span> <span class="string">http://mfln8n.coding-pages.com/</span> <span class="comment">## 百度站长平台中注册的域名</span></span><br><span class="line">  <span class="attr">token:</span>  <span class="comment">## 16位准入秘钥</span></span><br><span class="line">  <span class="attr">path:</span> <span class="string">baidu_urls.txt</span> <span class="comment">## 文本文档的地址， 新链接会保存在此文本文档里</span></span><br></pre></td></tr></table></figure>
</blockquote>
</li>
<li><p>获取准入秘钥</p>
<blockquote>
<p>在<a href="https://ziyuan.baidu.com/" target="_blank" rel="noopener">百度搜索资源平台</a>的平台收录中获取准入秘钥token —16位</p>
</blockquote>
</li>
<li><p>查看根目录下的_config.yml文件中url的值， 必须包含是百度站长平台注册的域名</p>
<blockquote>
<p>如：</p>
<figure class="highlight yml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># URL</span></span><br><span class="line"><span class="attr">url:</span> <span class="string">http://mfln8n.coding-pages.com/</span></span><br><span class="line"><span class="attr">root:</span> <span class="string">/</span></span><br></pre></td></tr></table></figure>
</blockquote>
</li>
<li><p>加入新的deployer:</p>
<blockquote>
<figure class="highlight yml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br></pre></td><td class="code"><pre><span class="line"><span class="attr">deploy:</span></span><br><span class="line"> <span class="bullet">-</span> <span class="attr">type:</span> <span class="string">git</span></span><br><span class="line">   <span class="attr">repo:</span> <span class="string">git@github.com:xxxxx</span></span><br><span class="line">   <span class="attr">branch:</span> <span class="string">master</span></span><br><span class="line">   <span class="comment"># 加入新的type</span></span><br><span class="line"> <span class="bullet">-</span> <span class="attr">type:</span> <span class="string">baidu_url_submitter</span> <span class="comment">## 添加这里内容即可</span></span><br></pre></td></tr></table></figure>
</blockquote>
</li>
</ul>
<h4 id="14-3-自动推送"><a href="#14-3-自动推送" class="headerlink" title="14.3 自动推送"></a>14.3 自动推送</h4><ul>
<li><p>安装自动推送JS代码的网页，在页面被访问时，页面URL将立即被推送给百度。</p>
</li>
<li><p>修改主题目录下的layout/post.ejs文件</p>
<blockquote>
<p>末尾添加自动推送代码：</p>
<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br></pre></td><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">script</span>&gt;</span></span><br><span class="line"><span class="actionscript">(<span class="function"><span class="keyword">function</span><span class="params">()</span></span>&#123;</span></span><br><span class="line"><span class="javascript">    <span class="keyword">var</span> bp = <span class="built_in">document</span>.createElement(<span class="string">'script'</span>);</span></span><br><span class="line"><span class="javascript">    <span class="keyword">var</span> curProtocol = <span class="built_in">window</span>.location.protocol.split(<span class="string">':'</span>)[<span class="number">0</span>];</span></span><br><span class="line"><span class="actionscript">    <span class="keyword">if</span> (curProtocol === <span class="string">'https'</span>) &#123;</span></span><br><span class="line"><span class="actionscript">        bp.src = <span class="string">'https://zz.bdstatic.com/linksubmit/push.js'</span>;</span></span><br><span class="line">    &#125;</span><br><span class="line"><span class="actionscript">    <span class="keyword">else</span> &#123;</span></span><br><span class="line"><span class="actionscript">        bp.src = <span class="string">'http://push.zhanzhang.baidu.com/push.js'</span>;</span></span><br><span class="line">    &#125;</span><br><span class="line"><span class="javascript">    <span class="keyword">var</span> s = <span class="built_in">document</span>.getElementsByTagName(<span class="string">"script"</span>)[<span class="number">0</span>];</span></span><br><span class="line">    s.parentNode.insertBefore(bp, s);</span><br><span class="line">&#125;)();</span><br><span class="line"><span class="tag">&lt;/<span class="name">script</span>&gt;</span></span><br></pre></td></tr></table></figure>
</blockquote>
</li>
</ul>
<hr>
<h3 id="15-百度统计功能"><a href="#15-百度统计功能" class="headerlink" title="15. 百度统计功能"></a>15. 百度统计功能</h3><ul>
<li><p>在<a href="https://tongji.baidu.com" target="_blank" rel="noopener">百度统计官网</a>上添加网站，获取统计代码</p>
<blockquote>
<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br></pre></td><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">script</span>&gt;</span></span><br><span class="line"><span class="actionscript"><span class="keyword">var</span> _hmt = _hmt || [];</span></span><br><span class="line"><span class="actionscript">(<span class="function"><span class="keyword">function</span><span class="params">()</span> </span>&#123;</span></span><br><span class="line"><span class="javascript">  <span class="keyword">var</span> hm = <span class="built_in">document</span>.createElement(<span class="string">"script"</span>);</span></span><br><span class="line"><span class="actionscript">  hm.src = <span class="string">"https://hm.baidu.com/hm.js?0113964bae57c4e8dcc0a90d835680c4"</span>;</span></span><br><span class="line"><span class="javascript">  <span class="keyword">var</span> s = <span class="built_in">document</span>.getElementsByTagName(<span class="string">"script"</span>)[<span class="number">0</span>]; </span></span><br><span class="line">  s.parentNode.insertBefore(hm, s);</span><br><span class="line">&#125;)();</span><br><span class="line"><span class="tag">&lt;/<span class="name">script</span>&gt;</span></span><br></pre></td></tr></table></figure>
</blockquote>
</li>
<li><p>修改文件<code>themes/yilia/layout/_partial/baidu-analytics.ejs</code></p>
</li>
<li><p>或者新建文件<code>themes/yilia/layout/baidu-tongji.ejs</code></p>
<blockquote>
<p>将获取的统计代码添加进去</p>
<p><code>baidu-analytics.ejs</code></p>
<p>或者</p>
<p>在<code>baidu-tongji.ejs</code>中</p>
<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">%</span> <span class="attr">if</span> (<span class="attr">theme.baidu_tongji</span>) &#123; %&gt;</span></span><br><span class="line">   //这里添加统计代码</span><br><span class="line"><span class="tag">&lt;<span class="name">%</span> &#125; %&gt;</span></span><br></pre></td></tr></table></figure>
</blockquote>
</li>
<li><p>修改主题的配置文件<code>themes/yilia/_config.yml</code></p>
<blockquote>
<figure class="highlight yml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br></pre></td><td class="code"><pre><span class="line"><span class="attr">baidu_analytics:</span> <span class="string">''</span></span><br><span class="line"><span class="comment"># 改为</span></span><br><span class="line"><span class="attr">baidu_analytics:</span> <span class="literal">true</span></span><br><span class="line"></span><br><span class="line"><span class="comment"># 或者</span></span><br><span class="line"><span class="comment"># 新建属性</span></span><br><span class="line"><span class="attr">baidu_tongji:</span> <span class="literal">true</span></span><br></pre></td></tr></table></figure>
</blockquote>
</li>
<li><p>注意：如果是新建的<code>baidu-tongji.ejs</code>文件</p>
<blockquote>
<p>还需要在<code>themes\yilia\layout\_partial\head.ejs</code>,在<code>&lt;/head&gt;</code>上面添加：</p>
<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">%-</span> <span class="attr">partial</span>("<span class="attr">baidu_tongji</span>") %&gt;</span></span><br></pre></td></tr></table></figure>
</blockquote>
</li>
<li><p>可以通过百度统计的<a href="https://tongji.baidu.com/sc-web/10000247748/home/js/check?siteId=15660763" target="_blank" rel="noopener">代码安装检查</a>功能来验证百度统计功能是否添加成功。</p>
</li>
</ul>
<hr>
<h3 id="16-评论系统"><a href="#16-评论系统" class="headerlink" title="16. 评论系统"></a>16. 评论系统</h3><h4 id="16-1-注册Leancloud"><a href="#16-1-注册Leancloud" class="headerlink" title="16.1 注册Leancloud"></a>16.1 注册Leancloud</h4><ul>
<li><p><a href="https://www.leancloud.cn/" target="_blank" rel="noopener">官网</a></p>
</li>
<li><p><a href="https://leancloud.cn/dashboard/login.html#/signup" target="_blank" rel="noopener">注册页面</a></p>
</li>
<li><p><a href="https://leancloud.cn/dashboard/applist.html#/newapp" target="_blank" rel="noopener">创建应用</a>：Hexo Blog Comment</p>
</li>
<li><p>获取Key</p>
<blockquote>
<p>选择刚刚创建的应用&gt;设置&gt;选择应用 Keys</p>
<p>获取APP ID和APP KEY了</p>
<figure class="highlight yml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line"><span class="attr">APP ID :</span> <span class="string">IbB069kzjoJ6yrtHz3F47kAh-gzGzoHsz</span></span><br><span class="line"><span class="attr">APP Key :</span> <span class="string">seteWK1qk6nSC5zBcB2TFfWi</span></span><br></pre></td></tr></table></figure>
</blockquote>
</li>
<li><p>设置Web安全域名</p>
<blockquote>
<p>设置的安全中心中设置</p>
<figure class="highlight yml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line"><span class="string">http://mfln8n.coding-pages.com</span></span><br><span class="line"><span class="string">https://chthollists.github.io</span></span><br></pre></td></tr></table></figure>
</blockquote>
</li>
</ul>
<h4 id="16-2-修改配置文件"><a href="#16-2-修改配置文件" class="headerlink" title="16.2 修改配置文件"></a>16.2 修改配置文件</h4><ul>
<li><p>修改<code>theme/yilia/layout/_partial/article.ejs</code></p>
<blockquote>
<p>在最末尾加上</p>
<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br></pre></td><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">%</span> <span class="attr">if</span> ((<span class="attr">theme.valine_type</span> === <span class="string">2</span> || (<span class="attr">theme.valine_type</span> === <span class="string">1</span> &amp;&amp; <span class="attr">post.valineenbale</span>)) &amp;&amp; !<span class="attr">index</span>)&#123; %&gt;</span></span><br><span class="line">  <span class="tag">&lt;<span class="name">%</span> <span class="attr">if</span> (<span class="attr">theme.valine</span> &amp;&amp; <span class="attr">theme.valine.appid</span> &amp;&amp; <span class="attr">theme.valine.appkey</span>)&#123; %&gt;</span></span><br><span class="line">      <span class="tag">&lt;<span class="name">section</span> <span class="attr">id</span>=<span class="string">"comments"</span> <span class="attr">class</span>=<span class="string">"comments"</span>&gt;</span></span><br><span class="line">        <span class="tag">&lt;<span class="name">style</span>&gt;</span></span><br><span class="line"><span class="css">          <span class="selector-class">.comments</span>&#123;<span class="attribute">margin</span>:<span class="number">30px</span>;<span class="attribute">padding</span>:<span class="number">10px</span>;<span class="attribute">background</span>:<span class="number">#fff</span>&#125;</span></span><br><span class="line"><span class="css">          <span class="keyword">@media</span> screen <span class="keyword">and</span> (<span class="attribute">max-width:</span><span class="number">800px</span>)&#123;<span class="selector-class">.comments</span>&#123;<span class="attribute">margin</span>:auto;<span class="attribute">padding</span>:<span class="number">10px</span>;<span class="attribute">background</span>:<span class="number">#fff</span>&#125;&#125;</span></span><br><span class="line">        <span class="tag">&lt;/<span class="name">style</span>&gt;</span></span><br><span class="line">        <span class="tag">&lt;<span class="name">%-</span> <span class="attr">partial</span>('<span class="attr">post</span>/<span class="attr">valine</span>', &#123;</span></span><br><span class="line"><span class="tag">          <span class="attr">key:</span> <span class="attr">post.slug</span>,</span></span><br><span class="line"><span class="tag">          <span class="attr">title:</span> <span class="attr">post.title</span>,</span></span><br><span class="line"><span class="tag">          <span class="attr">url:</span> <span class="attr">config.url</span>+<span class="attr">url_for</span>(<span class="attr">post.path</span>)</span></span><br><span class="line"><span class="tag">          &#125;) %&gt;</span></span><br><span class="line">    <span class="tag">&lt;/<span class="name">section</span>&gt;</span></span><br><span class="line">  <span class="tag">&lt;<span class="name">%</span> &#125; %&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">%</span> &#125; %&gt;</span></span><br></pre></td></tr></table></figure>
</blockquote>
</li>
<li><p>修改<code>theme/yilia/_config.yml</code></p>
<blockquote>
<p>添加</p>
<figure class="highlight yml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment">#6、Valine https://valine.js.org</span></span><br><span class="line"><span class="attr">valine_type:</span> <span class="number">1</span> <span class="comment">#0 关闭评论  2全开评论  1需要再文章md开头加入valineenbale:true</span></span><br><span class="line"><span class="attr">valine:</span> </span><br><span class="line"> <span class="attr">enable:</span> <span class="literal">true</span></span><br><span class="line"> <span class="attr">appid:</span>  <span class="string">你在注册时候得到的id</span></span><br><span class="line"> <span class="attr">appkey:</span>  <span class="string">你在注册时候得到的key</span></span><br><span class="line"> <span class="comment">#这里的appid和appkey如果配置失败可以试试改成app_id和app_key</span></span><br><span class="line"> <span class="attr">verify:</span> <span class="literal">true</span> <span class="comment">#验证码</span></span><br><span class="line"> <span class="attr">notify:</span> <span class="literal">true</span> <span class="comment">#评论回复提醒</span></span><br><span class="line"> <span class="attr">avatar:</span>  <span class="string">identicon</span>   <span class="comment">#评论列表头像样式：''/mm/identicon/monsterid/wavatar/retro/hide</span></span><br><span class="line"> <span class="attr">avatar_cdn:</span> <span class="string">''</span> <span class="comment">#头像CDN</span></span><br><span class="line"> <span class="comment">#评论框占位符</span></span><br><span class="line"> <span class="attr">placeholder:</span> <span class="string">ヾﾉ≧∀≦)o</span> <span class="string">'友情提醒，留下正确的邮箱地址可以第一时间获取评论反馈'</span></span><br><span class="line"> <span class="attr">guest_info:</span> <span class="string">nick,mail,link</span> <span class="comment"># custom comment header</span></span><br><span class="line"> <span class="attr">pageSize:</span> <span class="number">10</span> <span class="comment"># pagination size</span></span><br><span class="line"> <span class="attr">visitor:</span> <span class="literal">true</span></span><br></pre></td></tr></table></figure>
</blockquote>
</li>
<li><p>修改CDN加速：新建<code>theme/yilia/layout/_partial/post/valine.ejs</code></p>
<blockquote>
<p>官方的CDN是</p>
<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">//unpkg.com/valine/dist/Valine.min.js</span><br></pre></td></tr></table></figure>
</blockquote>
<blockquote>
<p>新建<code>valine.ejs</code>,内容</p>
<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br></pre></td><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">div</span> <span class="attr">id</span>=<span class="string">"vcomment"</span>&gt;</span><span class="tag">&lt;/<span class="name">div</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">script</span> <span class="attr">src</span>=<span class="string">"//cdn.jsdelivr.net/npm/jquery/dist/jquery.min.js"</span>&gt;</span><span class="tag">&lt;/<span class="name">script</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">script</span> <span class="attr">src</span>=<span class="string">"//cdn.jsdelivr.net/npm/leancloud-storage/dist/av-min.js"</span>&gt;</span><span class="tag">&lt;/<span class="name">script</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">script</span> <span class="attr">src</span>=<span class="string">'//cdn.jsdelivr.net/npm/valine/dist/Valine.min.js'</span>&gt;</span><span class="tag">&lt;/<span class="name">script</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">script</span>&gt;</span></span><br><span class="line"><span class="actionscript">   <span class="keyword">var</span> notify = <span class="string">'&lt;%= theme.valine.notify %&gt;'</span> == <span class="literal">true</span> ? <span class="literal">true</span> : <span class="literal">false</span>;</span></span><br><span class="line"><span class="actionscript">   <span class="keyword">var</span> verify = <span class="string">'&lt;%= theme.valine.verify %&gt;'</span> == <span class="literal">true</span> ? <span class="literal">true</span> : <span class="literal">false</span>;</span></span><br><span class="line"><span class="actionscript">   <span class="keyword">new</span> Valine(&#123;</span></span><br><span class="line">            av: AV,</span><br><span class="line"><span class="actionscript">            el: <span class="string">'#vcomment'</span>,</span></span><br><span class="line">            notify: notify,</span><br><span class="line">            verify: verify,</span><br><span class="line"><span class="actionscript">            app_id: <span class="string">"&lt;%= theme.valine.appid %&gt;"</span>,</span></span><br><span class="line"><span class="actionscript">            app_key: <span class="string">"&lt;%= theme.valine.appkey %&gt;"</span>,</span></span><br><span class="line"><span class="actionscript">            placeholder: <span class="string">"&lt;%= theme.valine.placeholder %&gt;"</span>,</span></span><br><span class="line"><span class="actionscript">            avatar: <span class="string">"&lt;%= theme.valine.avatar %&gt;"</span>,</span></span><br><span class="line"><span class="actionscript">            avatar_cdn: <span class="string">"&lt;%= theme.valine.avatar_cdn %&gt;"</span>,</span></span><br><span class="line"><span class="actionscript">            pageSize: <span class="string">"&lt;%= theme.valine.pageSize %&gt;"</span></span></span><br><span class="line">    &#125;);</span><br><span class="line"><span class="tag">&lt;/<span class="name">script</span>&gt;</span></span><br></pre></td></tr></table></figure>
</blockquote>
</li>
<li><p>如果你的valine_type: 也是1，那么然后就需要在你文章抬头加上</p>
<blockquote>
<figure class="highlight yml"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><span class="string">valineenbale:true</span></span><br></pre></td></tr></table></figure>
</blockquote>
</li>
<li><p>注意：由于不明原因没有登录功能，所以后续准备改用Gitment/Gitalk评论系统。</p>
</li>
</ul>
<h4 id="16-3-Gitalk评论系统"><a href="#16-3-Gitalk评论系统" class="headerlink" title="16.3 Gitalk评论系统"></a>16.3 Gitalk评论系统</h4><ul>
<li><p>注册(已有Github可以跳过注册)</p>
</li>
<li><p><a href="https://github.com/settings/applications/new" target="_blank" rel="noopener">创建APP应用</a></p>
<blockquote>
<figure class="highlight yml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># 创建APP的相关设置</span></span><br><span class="line"><span class="comment"># APP名称---无限制</span></span><br><span class="line"><span class="attr">Application name :</span> <span class="string">HexoBlogComment</span></span><br><span class="line"><span class="comment"># APP主页URL---无限制</span></span><br><span class="line"><span class="attr">Homepage URL :</span> <span class="string">github.com/chthollists</span></span><br><span class="line"><span class="comment"># APP 描述介绍---无限制</span></span><br><span class="line"><span class="attr">description :</span> <span class="string">Gitalk</span> <span class="string">Comment</span> <span class="string">APP</span> </span><br><span class="line"><span class="comment"># 回调地址---重要：取博客主页，要与_config.yml配置文件中的 config.url 一致</span></span><br><span class="line"><span class="attr">callback URL :</span> <span class="string">http://mfln8n.coding-pages.com</span></span><br></pre></td></tr></table></figure>
</blockquote>
</li>
<li><p>获取Client ID和Client Secret</p>
<blockquote>
<figure class="highlight yml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line"><span class="attr">Client ID:</span> <span class="string">ef41cd3f6bb938f5b4c6</span></span><br><span class="line"><span class="attr">Client Secret:</span> <span class="string">0a387b3802665d8a71757a618f93dfd8cb5ec7d8</span></span><br></pre></td></tr></table></figure>
</blockquote>
</li>
<li><p>新建Gitalk文件</p>
<blockquote>
<p>新建ejs文件<code>layout/_partial/post/gitalk.ejs</code></p>
<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br></pre></td><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">div</span> <span class="attr">id</span>=<span class="string">"gitalk-container"</span> <span class="attr">style</span>=<span class="string">"padding: 0px 30px 0px 30px;"</span>&gt;</span><span class="tag">&lt;/<span class="name">div</span>&gt;</span> </span><br><span class="line"></span><br><span class="line"><span class="tag">&lt;<span class="name">link</span> <span class="attr">rel</span>=<span class="string">"stylesheet"</span> <span class="attr">href</span>=<span class="string">"https://cdn.jsdelivr.net/npm/gitalk@1/dist/gitalk.css"</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">script</span> <span class="attr">src</span>=<span class="string">"https://cdn.jsdelivr.net/npm/gitalk@1/dist/gitalk.min.js"</span>&gt;</span><span class="tag">&lt;/<span class="name">script</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">script</span> <span class="attr">type</span>=<span class="string">"text/javascript"</span>&gt;</span></span><br><span class="line"></span><br><span class="line"><span class="handlebars"><span class="xml">if(<span class="tag">&lt;<span class="name">%=theme.gitalk.enable%</span>&gt;</span>)&#123;</span></span></span><br><span class="line"><span class="actionscript"><span class="keyword">var</span> gitalk = <span class="keyword">new</span> Gitalk(&#123;</span></span><br><span class="line"><span class="actionscript"> clientID: <span class="string">'&lt;%=theme.gitalk.ClientID%&gt;'</span>,</span></span><br><span class="line"><span class="actionscript"> clientSecret: <span class="string">'&lt;%=theme.gitalk.ClientSecret%&gt;'</span>,</span></span><br><span class="line"><span class="actionscript"> repo: <span class="string">'&lt;%=theme.gitalk.repo%&gt;'</span>,</span></span><br><span class="line"><span class="actionscript"> owner: <span class="string">'&lt;%=theme.gitalk.githubID%&gt;'</span>,</span></span><br><span class="line"><span class="actionscript"> admin: [<span class="string">'&lt;%=theme.gitalk.adminUser%&gt;'</span>],</span></span><br><span class="line"><span class="actionscript"> id: <span class="string">'&lt;%= page.date %&gt;'</span>,</span></span><br><span class="line"><span class="actionscript"> distractionFreeMode: <span class="string">'&lt;%=theme.gitalk.distractionFreeMode%&gt;'</span></span></span><br><span class="line"><span class="actionscript"> pageSize: <span class="string">"&lt;%= theme.gitalk.pageSize %&gt;"</span></span></span><br><span class="line">&#125;)</span><br><span class="line"><span class="actionscript">gitalk.render(<span class="string">'gitalk-container'</span>) </span></span><br><span class="line">&#125;</span><br><span class="line"><span class="tag">&lt;/<span class="name">script</span>&gt;</span></span><br></pre></td></tr></table></figure>
</blockquote>
</li>
<li><p>修改文件comment.scss</p>
<blockquote>
<p>完全替换<code>source-src/css/comment.scss</code>文件 </p>
<figure class="highlight css"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br></pre></td><td class="code"><pre><span class="line"><span class="selector-tag">disqus_thread</span>, <span class="selector-class">.duoshuo</span>, <span class="selector-class">.cloud-tie-wrapper</span>, <span class="selector-id">#SOHUCS</span>, <span class="selector-id">#gitment-ctn</span>, <span class="selector-id">#gitalk-container</span> &#123;</span><br><span class="line">  <span class="attribute">padding</span>: <span class="number">0</span> <span class="number">30px</span> <span class="meta">!important</span>;</span><br><span class="line">  <span class="attribute">min-height</span>: <span class="number">20px</span>;</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="selector-id">#SOHUCS</span> &#123;</span><br><span class="line">  #SOHU_MAIN .module-cmt-list .block-cont-gw &#123;</span><br><span class="line">    <span class="selector-tag">border-bottom</span>: 1<span class="selector-tag">px</span> <span class="selector-tag">dashed</span> <span class="selector-id">#c8c8c8</span> !<span class="selector-tag">important</span>;</span><br><span class="line">  &#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
</blockquote>
</li>
<li><p>修改<code>layout/_partial/article.ejs</code></p>
<blockquote>
<p>文件内新增gitalk相关的配置代码：</p>
<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br></pre></td><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">%</span> <span class="attr">if</span> ((<span class="attr">theme.gitalk_type</span> === <span class="string">2</span> || (<span class="attr">theme.gitalk_type</span> === <span class="string">1</span> &amp;&amp; <span class="attr">post.gitalkenbale</span>)) &amp;&amp; !<span class="attr">index</span>)&#123; %&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">%</span> <span class="attr">if</span>(<span class="attr">theme.gitalk.enable</span>)&#123; %&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">%-</span> <span class="attr">partial</span>('<span class="attr">post</span>/<span class="attr">gitalk</span>', &#123;</span></span><br><span class="line"><span class="tag">   <span class="attr">key:</span> <span class="attr">post.slug</span>,</span></span><br><span class="line"><span class="tag">   <span class="attr">title:</span> <span class="attr">post.title</span>,</span></span><br><span class="line"><span class="tag">   <span class="attr">url:</span> <span class="attr">config.url</span>+<span class="attr">url_for</span>(<span class="attr">post.path</span>)</span></span><br><span class="line"><span class="tag"> &#125;) %&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">%</span> &#125; %&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">%</span> &#125; %&gt;</span></span><br></pre></td></tr></table></figure>
</blockquote>
</li>
<li><p>最后修改<code>theme/yilia/_config.yml</code></p>
<blockquote>
<figure class="highlight yml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br></pre></td><td class="code"><pre><span class="line"><span class="attr">gitalk_type:</span>  <span class="number">1</span> <span class="comment">#0 关闭评论  2全开评论  1需要再文章md开头加入gitalkenbale: true</span></span><br><span class="line"><span class="attr">gitalk:</span></span><br><span class="line"><span class="attr">enable:</span> <span class="literal">true</span></span><br><span class="line"><span class="attr">githubID:</span> <span class="string">github帐号</span>     </span><br><span class="line"><span class="attr">repo:</span> <span class="string">仓库名称</span> <span class="string">(</span> <span class="string">用来存放评论的仓库名</span> <span class="string">)</span>   <span class="string">例如：blog-comments</span></span><br><span class="line"><span class="attr">ClientID:</span> <span class="string">Client</span> <span class="string">ID</span></span><br><span class="line"><span class="attr">ClientSecret:</span> <span class="string">Client</span> <span class="string">Secret</span></span><br><span class="line"><span class="attr">adminUser:</span> <span class="string">github帐号</span>   <span class="comment">#指定可初始化评论账户</span></span><br><span class="line"><span class="attr">distractionFreeMode:</span> <span class="literal">true</span></span><br></pre></td></tr></table></figure>

<figure class="highlight yml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br></pre></td><td class="code"><pre><span class="line"><span class="attr">gitalk:</span></span><br><span class="line"><span class="attr">enable:</span>  <span class="literal">true</span></span><br><span class="line"><span class="attr">githubID:</span>  <span class="string">'Chthollists'</span>   </span><br><span class="line"><span class="attr">repo:</span>  <span class="string">'chthollists.github.io'</span> <span class="comment">#这里可以另开一个也可以就用你博客的那个repo</span></span><br><span class="line"><span class="attr">ClientID:</span>  <span class="string">'xxxxxx'</span></span><br><span class="line"><span class="attr">ClientSecret:</span>  <span class="string">'xxxxxxxxxxxxxxxxxxxxxxxxx'</span></span><br><span class="line"><span class="attr">adminUser:</span>  <span class="string">'Chthollists'</span> </span><br><span class="line"><span class="attr">distractionFreeMode:</span> <span class="literal">true</span></span><br></pre></td></tr></table></figure>
</blockquote>
</li>
<li><p>注意：在Github创建OAuth APP时：</p>
<ul>
<li><p>如果博客只部署在一个云端，无论是Github Pages、Gitee Pages、Coding Pages还是个人搭建的云服务器，回调地址callback URL都选择博客主页</p>
</li>
<li><p>而当博客双线部署在多个云端时，会出现Error : Network Error 错误，此时回调地址callback URL要与_config.yml配置文件中的 config.url 一致，不然会无法登陆。</p>
<blockquote>
<figure class="highlight yml"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><span class="attr">callback URL:</span> <span class="string">http://mfln8n.coding-pages.com</span></span><br></pre></td></tr></table></figure>
</blockquote>
</li>
<li><p>参考：</p>
<blockquote>
<p><a href="https://www.cnblogs.com/liuurick/p/10713693.html" target="_blank" rel="noopener">Gitalk评论初始化无法登陆</a></p>
<p><a href="https://blog.csdn.net/w47_csdn/article/details/88858343" target="_blank" rel="noopener">Gitalk评论初始化登录时跳转回首页</a></p>
</blockquote>
</li>
</ul>
</li>
</ul>
<hr>
<h3 id="17-Live-2D功能"><a href="#17-Live-2D功能" class="headerlink" title="17. Live 2D功能"></a>17. Live 2D功能</h3><ul>
<li>Github 上的Live2D资源：<a href="https://github.com/dongshuyan/live2dDemo" target="_blank" rel="noopener">Live2D 模型</a></li>
<li><a href="https://blog.csdn.net/Aoman_Hao/article/details/82049821" target="_blank" rel="noopener">参考链接1</a>、<a href="https://qianlei6148.github.io/2018/10/11/hexo模版yilia添加可爱的看板娘" target="_blank" rel="noopener">参考链接2</a>、<a href="https://zhousiwei.gitee.io/2019/05/05/Hexo%E5%8D%9A%E5%AE%A2%E6%B7%BB%E5%8A%A0helper-live2d%E5%8A%A8%E6%80%81%E6%A8%A1%E5%9E%8B%E6%8F%92%E4%BB%B6/" target="_blank" rel="noopener">参考链接3</a></li>
</ul>
<h4 id="17-1-下载插件和模型"><a href="#17-1-下载插件和模型" class="headerlink" title="17.1  下载插件和模型"></a>17.1  下载插件和模型</h4><ul>
<li><p>安装插件 <a href="https://github.com/EYHN/hexo-helper-live2d" target="_blank" rel="noopener">hexo-helper-live2d</a></p>
<blockquote>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">npm install --save hexo-helper-live2d</span><br></pre></td></tr></table></figure>
</blockquote>
</li>
<li><p>安装2D模型：<a href="https://github.com/dongshuyan/live2dDemo" target="_blank" rel="noopener">Live2D 模型</a></p>
<blockquote>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">npm install live2d-widget-model-模型名称</span><br></pre></td></tr></table></figure>
</blockquote>
</li>
</ul>
<h4 id="17-2-更改模型路径"><a href="#17-2-更改模型路径" class="headerlink" title="17.2 更改模型路径"></a>17.2 更改模型路径</h4><ul>
<li>在博客根目录下新建目录 live2d_models</li>
<li>从目录node_modules中拷贝模型文件，放到live2d_models中</li>
</ul>
<h4 id="17-3-添加配置"><a href="#17-3-添加配置" class="headerlink" title="17.3 添加配置"></a>17.3 添加配置</h4><ul>
<li><p>说明文档：<a href="https://l2dwidget.js.org/docs/class/src/index.js~L2Dwidget.html#instance-method-init" target="_blank" rel="noopener">Live2D-widget.js.org</a></p>
</li>
<li><p>修改根目录下的<code>_config.yml</code>配置文件</p>
<blockquote>
<p>配置文件示例</p>
<figure class="highlight yml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># Live2D</span></span><br><span class="line"><span class="comment">## https://github.com/EYHN/hexo-helper-live2d</span></span><br><span class="line"><span class="comment">## https://l2dwidget.js.org/docs/class/src/index.js~L2Dwidget.html#instance-method-init</span></span><br><span class="line"><span class="attr">live2d:</span></span><br><span class="line">  <span class="attr">enable:</span> <span class="literal">true</span></span><br><span class="line">  <span class="comment">#enable: false</span></span><br><span class="line">  <span class="attr">scriptFrom:</span> <span class="string">local</span> <span class="comment"># 默认</span></span><br><span class="line">  <span class="attr">pluginRootPath:</span> <span class="string">live2dw/</span> <span class="comment"># 插件在站点上的根目录(相对路径)</span></span><br><span class="line">  <span class="attr">pluginJsPath:</span> <span class="string">lib/</span> <span class="comment"># 脚本文件相对与插件根目录路径</span></span><br><span class="line">  <span class="attr">pluginModelPath:</span> <span class="string">assets/</span> <span class="comment"># 模型文件相对与插件根目录路径</span></span><br><span class="line">  <span class="comment"># scriptFrom: jsdelivr # jsdelivr CDN</span></span><br><span class="line">  <span class="comment"># scriptFrom: unpkg # unpkg CDN</span></span><br><span class="line">  <span class="comment"># scriptFrom: https://cdn.jsdelivr.net/npm/live2d-widget@3.x/lib/L2Dwidget.min.js # 你的自定义 url</span></span><br><span class="line">  <span class="attr">tagMode:</span> <span class="literal">false</span> <span class="comment"># 标签模式, 是否仅替换 live2d tag标签而非插入到所有页面中</span></span><br><span class="line">  <span class="attr">debug:</span> <span class="literal">false</span> <span class="comment"># 调试, 是否在控制台输出日志</span></span><br><span class="line">  <span class="attr">model:</span></span><br><span class="line">    <span class="attr">use:</span>  <span class="comment"># 模型名</span></span><br><span class="line">    <span class="comment"># use: live2d-widget-model-wanko # npm-module package name</span></span><br><span class="line">    <span class="comment"># use: wanko # 博客根目录/live2d_models/ 下的目录名</span></span><br><span class="line">    <span class="comment"># use: ./wives/wanko # 相对于博客根目录的路径</span></span><br><span class="line">    <span class="comment"># use: https://cdn.jsdelivr.net/npm/live2d-widget-model-wanko@1.0.5/assets/wanko.model.json # 你的自定义 url</span></span><br><span class="line">  <span class="attr">display:</span></span><br><span class="line">    <span class="attr">position:</span> <span class="string">right</span></span><br><span class="line">    <span class="attr">width:</span> <span class="number">145</span></span><br><span class="line">    <span class="attr">height:</span> <span class="number">315</span></span><br><span class="line">  <span class="attr">mobile:</span></span><br><span class="line">    <span class="attr">show:</span> <span class="literal">true</span> <span class="comment"># 是否在移动设备上显示</span></span><br><span class="line">    <span class="attr">scale:</span> <span class="number">0.5</span> <span class="comment"># 移动设备上的缩放       </span></span><br><span class="line">  <span class="attr">react:</span></span><br><span class="line">    <span class="attr">opacityDefault:</span> <span class="number">0.7</span></span><br><span class="line">    <span class="attr">opacityOnHover:</span> <span class="number">0.8</span></span><br></pre></td></tr></table></figure>
</blockquote>
</li>
</ul>
<hr>
<h3 id="18-其他功能"><a href="#18-其他功能" class="headerlink" title="18. 其他功能"></a>18. 其他功能</h3><blockquote>
<p>后续逐步完善</p>
</blockquote>
<h4 id="18-1-图床"><a href="#18-1-图床" class="headerlink" title="18.1 图床"></a>18.1 图床</h4><p><a href="https://cloudy-liu.github.io/2018/04/07/Hexo_yilia_%E4%B8%BB%E9%A2%98%E4%B8%80%E6%8F%BD%E5%AD%90%E4%BC%98%E5%8C%96%E6%96%B9%E6%A1%88/" target="_blank" rel="noopener">七牛云图床</a></p>
<hr>
<h4 id="18-2-RSS"><a href="#18-2-RSS" class="headerlink" title="18.2 RSS"></a>18.2 RSS</h4><p><a href="https://blog.csdn.net/qq_40922859/article/details/97035497?utm_medium=distribute.pc_relevant.none-task-blog-BlogCommendFromMachineLearnPai2-2.channel_param&depth_1-utm_source=distribute.pc_relevant.none-task-blog-BlogCommendFromMachineLearnPai2-2.channel_param" target="_blank" rel="noopener">RSS</a></p>
<hr>
<h4 id="18-3-一言API个性签名自动刷新"><a href="#18-3-一言API个性签名自动刷新" class="headerlink" title="18.3 一言API个性签名自动刷新"></a>18.3 一言API个性签名自动刷新</h4><p><a href="https://blog.csdn.net/qq_40922859/article/details/97035497?utm_medium=distribute.pc_relevant.none-task-blog-BlogCommendFromMachineLearnPai2-2.channel_param&depth_1-utm_source=distribute.pc_relevant.none-task-blog-BlogCommendFromMachineLearnPai2-2.channel_param" target="_blank" rel="noopener">一言API个性签名自动刷新</a></p>
<hr>
<h4 id="18-4-Google收录"><a href="#18-4-Google收录" class="headerlink" title="18.4 Google收录"></a>18.4 Google收录</h4><p><a href="http://dongshuyan.com/2019/05/24/hexo%E5%8D%9A%E5%AE%A2%E6%B3%A8%E6%84%8F%E4%BA%8B%E9%A1%B9/#4-%E6%80%8E%E4%B9%88%E7%BD%AE%E9%A1%B6%E6%96%87%E7%AB%A0" target="_blank" rel="noopener">站点地图</a></p>
<hr>
<h4 id="18-5-Google广告投放"><a href="#18-5-Google广告投放" class="headerlink" title="18.5 Google广告投放"></a>18.5 Google广告投放</h4><p><a href="http://dongshuyan.com/2019/05/24/hexo%E5%8D%9A%E5%AE%A2%E6%B3%A8%E6%84%8F%E4%BA%8B%E9%A1%B9/#4-%E6%80%8E%E4%B9%88%E7%BD%AE%E9%A1%B6%E6%96%87%E7%AB%A0" target="_blank" rel="noopener">Google广告</a></p>
<hr>
<hr>
<h2 id="附录：参考资料"><a href="#附录：参考资料" class="headerlink" title="附录：参考资料"></a>附录：参考资料</h2><ul>
<li><p>参考资料：</p>
<blockquote>
<p><a href="https://cloudy-liu.github.io/2018/04/07/Hexo_yilia" target="_blank" rel="noopener">https://cloudy-liu.github.io/2018/04/07/Hexo_yilia</a></p>
<p><a href="https://blog.csdn.net/weixin_41287260/article/details/97693850" target="_blank" rel="noopener">https://blog.csdn.net/weixin_41287260/article/details/97693850</a></p>
<p><a href="https://blog.csdn.net/qq_37939980/article/details/104390332" target="_blank" rel="noopener">https://blog.csdn.net/qq_37939980/article/details/104390332</a></p>
<p><a href="http://dongshuyan.com/2019/05/24/hexo" target="_blank" rel="noopener">http://dongshuyan.com/2019/05/24/hexo</a></p>
<p><a href="https://github.com/dongshuyan/live2dDemo" target="_blank" rel="noopener">https://github.com/dongshuyan/live2dDemo</a></p>
</blockquote>
</li>
<li><p>视频教程</p>
<blockquote>
<p><a href="https://www.bilibili.com/video/BV1pt411K7o9?p=8" target="_blank" rel="noopener">https://www.bilibili.com/video/BV1pt411K7o9?p=8</a></p>
<p><a href="https://www.bilibili.com/video/BV1Yb411a7ty/?spm_id_from=333.788.videocard.2" target="_blank" rel="noopener">https://www.bilibili.com/video/BV1Yb411a7ty/?spm_id_from=333.788.videocard.2</a></p>
</blockquote>
</li>
</ul>

       -->
	        
	  
	  
	  
	  
<!-- 《添加版权声明 -->
        
            <!-- 《添加版权声明 -->


<!-- #版权基础设定：0-关闭声明； 1-文章对应的md文件里有declare: true属性，才有版权声明； 2-所有文章均有版权声明 -->

  <div class="declare">
    <strong class="author">本文作者：</strong>
    
      <a href="https://chthollists.github.io"title="Chthollists" target="_blank">Chthollists</a>
    
    <br>
    <strong class="create-time">发布时间：</strong>
    2020-07-28 20:18:58
    <br>
    <strong class="update-time">最后更新：</strong>
    2021-12-26 23:46:40
    <br>
    <strong class="article-titles">本文标题：</strong>
    <a href="https://chthollists.github.io/post/686a3de0.html" title="Hexo博客搭建全家桶——不定期更新" target="_blank">Hexo博客搭建全家桶——不定期更新</a>
    <br>
    <strong class="article-url">本文链接：</strong>
    <a href="https://chthollists.github.io/post/686a3de0.html" title="Hexo博客搭建全家桶——不定期更新" target="_blank">https://chthollists.github.io/post/686a3de0.html</a>
    <br>
    <strong class="copyright">版权声明：</strong>
    本作品采用
    <a rel="license noopener" href="https://creativecommons.org/licenses/by-nc-sa/4.0/" target="_blank" title="知识共享署名-非商业性使用-相同方式共享 4.0 国际许可协议">CC BY-NC-SA 4.0</a>
    许可协议进行许可。转载请注明作者和出处！
    
      <br>
      <a rel="license noopener" href="https://creativecommons.org/licenses/by-nc-sa/4.0/" target="_blank"><img alt="知识共享许可协议" style="border-width:0" src="https://i.creativecommons.org/l/by-nc-sa/4.0/88x31.png"/></a>
    
  </div>

<!-- 添加版权声明》 -->
        
<!-- 添加版权声明》 -->

      
        <div class="page-reward">
          <a href="javascript:;" class="page-reward-btn tooltip-top">
            <div class="tooltip tooltip-east">
            <span class="tooltip-item">
              支持
            </span>
            <span class="tooltip-content">
              <span class="tooltip-text">
                <span class="tooltip-inner">
                  <p class="reward-p"><i class="icon icon-quo-left"></i>感谢您的支持<i class="icon icon-quo-right"></i></p>
                  <div class="reward-box">
                    
                    <div class="reward-box-item">
                      <img class="reward-img" src="/assets/alipay.jpg">
                      <span class="reward-type">支付宝</span>
                    </div>
                    
                    
                    <div class="reward-box-item">
                      <img class="reward-img" src="/assets/payforwechat.jpg">
                      <span class="reward-type">微信</span>
                    </div>
                    
                  </div>
                </span>
              </span>
            </span>
          </div>
          </a>
        </div>
      
    </div>
	
	
	
    <div class="article-info article-info-index">
      
        <div class="article-pop-out tagcloud">
          <i class="icon-tuding"></i>
          <a class="article-tag-list-link color3">置顶</a>
        </div>
      
      
	<div class="article-tag tagcloud">
		<i class="icon-price-tags icon"></i>
		<ul class="article-tag-list">
			 
        		<li class="article-tag-list-item">
        			<a href="javascript:void(0)" class="js-tag article-tag-list-link color5">Hexo</a>
        		</li>
      		 
        		<li class="article-tag-list-item">
        			<a href="javascript:void(0)" class="js-tag article-tag-list-link color2">Live2D</a>
        		</li>
      		 
        		<li class="article-tag-list-item">
        			<a href="javascript:void(0)" class="js-tag article-tag-list-link color2">Gitalk</a>
        		</li>
      		 
        		<li class="article-tag-list-item">
        			<a href="javascript:void(0)" class="js-tag article-tag-list-link color4">Git</a>
        		</li>
      		 
        		<li class="article-tag-list-item">
        			<a href="javascript:void(0)" class="js-tag article-tag-list-link color4">SEO</a>
        		</li>
      		 
        		<li class="article-tag-list-item">
        			<a href="javascript:void(0)" class="js-tag article-tag-list-link color3">SiteMap</a>
        		</li>
      		 
        		<li class="article-tag-list-item">
        			<a href="javascript:void(0)" class="js-tag article-tag-list-link color3">Node.js</a>
        		</li>
      		
		</ul>
	</div>

      
	<div class="article-category tagcloud">
		<i class="icon-book icon"></i>
		<ul class="article-tag-list">
			 
        		<li class="article-tag-list-item">
        			<a href="/categories/others//" class="article-tag-list-link color2">others</a>
        		</li>
      		 
        		<li class="article-tag-list-item">
        			<a href="/categories/others/Hexo//" class="article-tag-list-link color5">Hexo</a>
        		</li>
      		
		</ul>
	</div>


      

      
        
<div class="share-btn share-icons tooltip-left">
  <div class="tooltip tooltip-east">
    <span class="tooltip-item">
      <a href="javascript:;" class="share-sns share-outer">
        <i class="icon icon-share"></i>
      </a>
    </span>
    <span class="tooltip-content">
      <div class="share-wrap">
        <div class="share-icons">
          <a class="weibo share-sns" href="javascript:;" data-type="weibo">
            <i class="icon icon-weibo"></i>
          </a>
          <a class="weixin share-sns wxFab" href="javascript:;" data-type="weixin">
            <i class="icon icon-weixin"></i>
          </a>
          <a class="qq share-sns" href="javascript:;" data-type="qq">
            <i class="icon icon-qq"></i>
          </a>
          <a class="douban share-sns" href="javascript:;" data-type="douban">
            <i class="icon icon-douban"></i>
          </a>
          <a class="qzone share-sns" href="javascript:;" data-type="qzone">
            <i class="icon icon-qzone"></i>
          </a>
          <a class="facebook share-sns" href="javascript:;" data-type="facebook">
            <i class="icon icon-facebook"></i>
          </a>
          <a class="twitter share-sns" href="javascript:;" data-type="twitter">
            <i class="icon icon-twitter"></i>
          </a>
          <a class="google share-sns" href="javascript:;" data-type="google">
            <i class="icon icon-google"></i>
          </a>
        </div>
      </div>
    </span>
  </div>
</div>

<div class="page-modal wx-share js-wx-box">
    <a class="close js-modal-close" href="javascript:;"><i class="icon icon-close"></i></a>
    <p>扫一扫，分享到微信</p>
    <div class="wx-qrcode">
      <img src="//api.qrserver.com/v1/create-qr-code/?size=150x150&data=https://chthollists.github.ioom/post/686a3de0.html" alt="微信分享二维码">
    </div>
</div>

<div class="mask js-mask"></div>
      
      <div class="clearfix"></div>
  
	  
    </div>
  </div>
</article>






  
<nav id="article-nav">
  
    <a href="/post/7496a9d6.html" id="article-nav-newer" class="article-nav-link-wrap">
      <i class="icon-circle-left"></i>
      <div class="article-nav-title">
        
          Encryption test
        
      </div>
    </a>
  
  
    <a href="/post/4a17b156.html" id="article-nav-older" class="article-nav-link-wrap">
      <div class="article-nav-title">Hexo博客常用命令汇总</div>
      <i class="icon-circle-right"></i>
    </a>
  
</nav>


<aside class="wrap-side-operation">
    <div class="mod-side-operation">
        
        <div class="jump-container" id="js-jump-container" style="display:none;">
            <a href="javascript:void(0)" class="mod-side-operation__jump-to-top">
                <i class="icon-font icon-back"></i>
            </a>
            <div id="js-jump-plan-container" class="jump-plan-container" style="top: -11px;">
                <i class="icon-font icon-plane jump-plane"></i>
            </div>
        </div>
        
        
        <div class="toc-container tooltip-left">
            <i class="icon-font icon-category"></i>
            <div class="tooltip tooltip-east">
                <span class="tooltip-item">
                </span>
                <span class="tooltip-content">
                    <div class="toc-article">
                    <ol class="toc"><li class="toc-item toc-level-1"><a class="toc-link" href="#Hexo博客搭建全家桶——不定期更新"><span class="toc-number">1.</span> <span class="toc-text">Hexo博客搭建全家桶——不定期更新</span></a><ol class="toc-child"><li class="toc-item toc-level-2"><a class="toc-link" href="#一、博客分类及搭建工具"><span class="toc-number">1.1.</span> <span class="toc-text">一、博客分类及搭建工具</span></a><ol class="toc-child"><li class="toc-item toc-level-3"><a class="toc-link" href="#1-动态博客-Dynamic-Blog"><span class="toc-number">1.1.1.</span> <span class="toc-text">1. 动态博客 Dynamic Blog</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#2-静态博客-Static-blog"><span class="toc-number">1.1.2.</span> <span class="toc-text">2. 静态博客 Static blog</span></a><ol class="toc-child"><li class="toc-item toc-level-4"><a class="toc-link" href="#2-1-静态博客框架"><span class="toc-number">1.1.2.1.</span> <span class="toc-text">2.1 静态博客框架</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#2-2-服务器"><span class="toc-number">1.1.2.2.</span> <span class="toc-text">2.2 服务器</span></a></li></ol></li></ol></li><li class="toc-item toc-level-2"><a class="toc-link" href="#二、Git与Github"><span class="toc-number">1.2.</span> <span class="toc-text">二、Git与Github</span></a><ol class="toc-child"><li class="toc-item toc-level-3"><a class="toc-link" href="#1-Git安装与配置"><span class="toc-number">1.2.1.</span> <span class="toc-text">1. Git安装与配置</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#2-Git创建仓库及管理"><span class="toc-number">1.2.2.</span> <span class="toc-text">2. Git创建仓库及管理</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#3-Git远程仓库"><span class="toc-number">1.2.3.</span> <span class="toc-text">3. Git远程仓库</span></a></li></ol></li><li class="toc-item toc-level-2"><a class="toc-link" href="#三、利用Hexo搭建博客"><span class="toc-number">1.3.</span> <span class="toc-text">三、利用Hexo搭建博客</span></a><ol class="toc-child"><li class="toc-item toc-level-3"><a class="toc-link" href="#1-准备工作-Nodejs-amp-Git"><span class="toc-number">1.3.1.</span> <span class="toc-text">1. 准备工作 Nodejs &amp; Git</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#2-Hexo安装及配置"><span class="toc-number">1.3.2.</span> <span class="toc-text">2. Hexo安装及配置</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#3-博客部署到远端服务器"><span class="toc-number">1.3.3.</span> <span class="toc-text">3. 博客部署到远端服务器</span></a></li></ol></li><li class="toc-item toc-level-2"><a class="toc-link" href="#四、博客设置美化"><span class="toc-number">1.4.</span> <span class="toc-text">四、博客设置美化</span></a><ol class="toc-child"><li class="toc-item toc-level-3"><a class="toc-link" href="#1-主题更换-：Yilia"><span class="toc-number">1.4.1.</span> <span class="toc-text">1. 主题更换 ：Yilia</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#2-配置图片资源和链接资源"><span class="toc-number">1.4.2.</span> <span class="toc-text">2. 配置图片资源和链接资源</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#3-博客文章美化设置"><span class="toc-number">1.4.3.</span> <span class="toc-text">3. 博客文章美化设置</span></a><ol class="toc-child"><li class="toc-item toc-level-4"><a class="toc-link" href="#3-1-显示文章摘要"><span class="toc-number">1.4.3.1.</span> <span class="toc-text">3.1 显示文章摘要</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#3-2-显示文章目录TOC"><span class="toc-number">1.4.3.2.</span> <span class="toc-text">3.2 显示文章目录TOC</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#3-3-增加归档菜单"><span class="toc-number">1.4.3.3.</span> <span class="toc-text">3.3 增加归档菜单</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#3-4-美化目录"><span class="toc-number">1.4.3.4.</span> <span class="toc-text">3.4 美化目录</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#3-5-字体美化"><span class="toc-number">1.4.3.5.</span> <span class="toc-text">3.5 字体美化</span></a></li></ol></li><li class="toc-item toc-level-3"><a class="toc-link" href="#4-博客主页美化"><span class="toc-number">1.4.4.</span> <span class="toc-text">4. 博客主页美化</span></a><ol class="toc-child"><li class="toc-item toc-level-4"><a class="toc-link" href="#4-1-修改博客标题、子标题、用户"><span class="toc-number">1.4.4.1.</span> <span class="toc-text">4.1 修改博客标题、子标题、用户</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#4-2-主页左侧显示文章总数"><span class="toc-number">1.4.4.2.</span> <span class="toc-text">4.2 主页左侧显示文章总数</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#4-3-设置个性签名"><span class="toc-number">1.4.4.3.</span> <span class="toc-text">4.3 设置个性签名</span></a></li></ol></li></ol></li><li class="toc-item toc-level-2"><a class="toc-link" href="#五、高级功能实现"><span class="toc-number">1.5.</span> <span class="toc-text">五、高级功能实现</span></a><ol class="toc-child"><li class="toc-item toc-level-3"><a class="toc-link" href="#1-微信分享功能"><span class="toc-number">1.5.1.</span> <span class="toc-text">1. 微信分享功能</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#2-文章置顶功能"><span class="toc-number">1.5.2.</span> <span class="toc-text">2. 文章置顶功能</span></a><ol class="toc-child"><li class="toc-item toc-level-4"><a class="toc-link" href="#2-1-安装插件"><span class="toc-number">1.5.2.1.</span> <span class="toc-text">2.1 安装插件</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#2-2-配置置顶标准"><span class="toc-number">1.5.2.2.</span> <span class="toc-text">2.2 配置置顶标准</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#2-3-配置文章"><span class="toc-number">1.5.2.3.</span> <span class="toc-text">2.3 配置文章</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#2-4-优先级配置"><span class="toc-number">1.5.2.4.</span> <span class="toc-text">2.4 优先级配置</span></a></li></ol></li><li class="toc-item toc-level-3"><a class="toc-link" href="#3-文章标签分类功能"><span class="toc-number">1.5.3.</span> <span class="toc-text">3. 文章标签分类功能</span></a><ol class="toc-child"><li class="toc-item toc-level-4"><a class="toc-link" href="#3-1-文章分类功能"><span class="toc-number">1.5.3.1.</span> <span class="toc-text">3.1 文章分类功能</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#3-2-文章标签分类功能"><span class="toc-number">1.5.3.2.</span> <span class="toc-text">3.2 文章标签分类功能</span></a></li></ol></li><li class="toc-item toc-level-3"><a class="toc-link" href="#4-添加404网页"><span class="toc-number">1.5.4.</span> <span class="toc-text">4. 添加404网页</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#5-头像旋转功能"><span class="toc-number">1.5.5.</span> <span class="toc-text">5. 头像旋转功能</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#6-修改默认文章格式"><span class="toc-number">1.5.6.</span> <span class="toc-text">6. 修改默认文章格式</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#7-不蒜子统计功能"><span class="toc-number">1.5.7.</span> <span class="toc-text">7. 不蒜子统计功能</span></a><ol class="toc-child"><li class="toc-item toc-level-4"><a class="toc-link" href="#7-1-安装不蒜子统计脚本"><span class="toc-number">1.5.7.1.</span> <span class="toc-text">7.1 安装不蒜子统计脚本</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#7-2-博客访问量统计"><span class="toc-number">1.5.7.2.</span> <span class="toc-text">7.2 博客访问量统计</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#7-3-单篇文章点击量统计方法一"><span class="toc-number">1.5.7.3.</span> <span class="toc-text">7.3 单篇文章点击量统计方法一</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#7-4-单篇文章点击量统计方法二"><span class="toc-number">1.5.7.4.</span> <span class="toc-text">7.4 单篇文章点击量统计方法二</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#7-5-不蒜子统计与Live2D冲突问题"><span class="toc-number">1.5.7.5.</span> <span class="toc-text">7.5 不蒜子统计与Live2D冲突问题</span></a></li></ol></li><li class="toc-item toc-level-3"><a class="toc-link" href="#8-字数统计和阅读时长功能"><span class="toc-number">1.5.8.</span> <span class="toc-text">8. 字数统计和阅读时长功能</span></a><ol class="toc-child"><li class="toc-item toc-level-4"><a class="toc-link" href="#8-1-字数统计"><span class="toc-number">1.5.8.1.</span> <span class="toc-text">8.1 字数统计</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#8-2-阅读时长统计"><span class="toc-number">1.5.8.2.</span> <span class="toc-text">8.2 阅读时长统计</span></a></li></ol></li><li class="toc-item toc-level-3"><a class="toc-link" href="#9-背景音乐功能"><span class="toc-number">1.5.9.</span> <span class="toc-text">9. 背景音乐功能</span></a><ol class="toc-child"><li class="toc-item toc-level-4"><a class="toc-link" href="#9-1-文章内音乐"><span class="toc-number">1.5.9.1.</span> <span class="toc-text">9.1 文章内音乐</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#9-2-主页背景音乐"><span class="toc-number">1.5.9.2.</span> <span class="toc-text">9.2 主页背景音乐</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#9-3-遗留问题-未解决"><span class="toc-number">1.5.9.3.</span> <span class="toc-text">9.3 遗留问题(未解决)</span></a></li></ol></li><li class="toc-item toc-level-3"><a class="toc-link" href="#10-文章加密功能"><span class="toc-number">1.5.10.</span> <span class="toc-text">10. 文章加密功能</span></a><ol class="toc-child"><li class="toc-item toc-level-4"><a class="toc-link" href="#10-1-引入加密插件"><span class="toc-number">1.5.10.1.</span> <span class="toc-text">10.1 引入加密插件</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#10-2-修改配置"><span class="toc-number">1.5.10.2.</span> <span class="toc-text">10.2 修改配置</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#10-3-修改MD文章开头属性"><span class="toc-number">1.5.10.3.</span> <span class="toc-text">10.3 修改MD文章开头属性</span></a></li></ol></li><li class="toc-item toc-level-3"><a class="toc-link" href="#11-版权信息功能"><span class="toc-number">1.5.11.</span> <span class="toc-text">11. 版权信息功能</span></a><ol class="toc-child"><li class="toc-item toc-level-4"><a class="toc-link" href="#11-1-直接修改版"><span class="toc-number">1.5.11.1.</span> <span class="toc-text">11.1 直接修改版</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#11-2-新建文件版"><span class="toc-number">1.5.11.2.</span> <span class="toc-text">11.2 新建文件版</span></a></li></ol></li><li class="toc-item toc-level-3"><a class="toc-link" href="#12-爱心、光玉特效功能"><span class="toc-number">1.5.12.</span> <span class="toc-text">12. 爱心、光玉特效功能</span></a><ol class="toc-child"><li class="toc-item toc-level-4"><a class="toc-link" href="#12-1-点击爱心"><span class="toc-number">1.5.12.1.</span> <span class="toc-text">12.1 点击爱心</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#12-2-光玉特效"><span class="toc-number">1.5.12.2.</span> <span class="toc-text">12.2 光玉特效</span></a></li></ol></li><li class="toc-item toc-level-3"><a class="toc-link" href="#13-SEO优化"><span class="toc-number">1.5.13.</span> <span class="toc-text">13. SEO优化</span></a><ol class="toc-child"><li class="toc-item toc-level-4"><a class="toc-link" href="#13-1-加密文章URL"><span class="toc-number">1.5.13.1.</span> <span class="toc-text">13.1 加密文章URL</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#13-2-添加站点地图SiteMap"><span class="toc-number">1.5.13.2.</span> <span class="toc-text">13.2 添加站点地图SiteMap</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#13-3-注册百度站长平台"><span class="toc-number">1.5.13.3.</span> <span class="toc-text">13.3 注册百度站长平台</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#13-4-针对百度搜索引擎的优化"><span class="toc-number">1.5.13.4.</span> <span class="toc-text">13.4 针对百度搜索引擎的优化</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#13-5-网站结构自身优化"><span class="toc-number">1.5.13.5.</span> <span class="toc-text">13.5 网站结构自身优化</span></a></li></ol></li><li class="toc-item toc-level-3"><a class="toc-link" href="#14-百度推送收录功能"><span class="toc-number">1.5.14.</span> <span class="toc-text">14. 百度推送收录功能</span></a><ol class="toc-child"><li class="toc-item toc-level-4"><a class="toc-link" href="#14-1-新增博客文章页面自动推送"><span class="toc-number">1.5.14.1.</span> <span class="toc-text">14.1 新增博客文章页面自动推送</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#14-2-主动推送"><span class="toc-number">1.5.14.2.</span> <span class="toc-text">14.2 主动推送</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#14-3-自动推送"><span class="toc-number">1.5.14.3.</span> <span class="toc-text">14.3 自动推送</span></a></li></ol></li><li class="toc-item toc-level-3"><a class="toc-link" href="#15-百度统计功能"><span class="toc-number">1.5.15.</span> <span class="toc-text">15. 百度统计功能</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#16-评论系统"><span class="toc-number">1.5.16.</span> <span class="toc-text">16. 评论系统</span></a><ol class="toc-child"><li class="toc-item toc-level-4"><a class="toc-link" href="#16-1-注册Leancloud"><span class="toc-number">1.5.16.1.</span> <span class="toc-text">16.1 注册Leancloud</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#16-2-修改配置文件"><span class="toc-number">1.5.16.2.</span> <span class="toc-text">16.2 修改配置文件</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#16-3-Gitalk评论系统"><span class="toc-number">1.5.16.3.</span> <span class="toc-text">16.3 Gitalk评论系统</span></a></li></ol></li><li class="toc-item toc-level-3"><a class="toc-link" href="#17-Live-2D功能"><span class="toc-number">1.5.17.</span> <span class="toc-text">17. Live 2D功能</span></a><ol class="toc-child"><li class="toc-item toc-level-4"><a class="toc-link" href="#17-1-下载插件和模型"><span class="toc-number">1.5.17.1.</span> <span class="toc-text">17.1  下载插件和模型</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#17-2-更改模型路径"><span class="toc-number">1.5.17.2.</span> <span class="toc-text">17.2 更改模型路径</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#17-3-添加配置"><span class="toc-number">1.5.17.3.</span> <span class="toc-text">17.3 添加配置</span></a></li></ol></li><li class="toc-item toc-level-3"><a class="toc-link" href="#18-其他功能"><span class="toc-number">1.5.18.</span> <span class="toc-text">18. 其他功能</span></a><ol class="toc-child"><li class="toc-item toc-level-4"><a class="toc-link" href="#18-1-图床"><span class="toc-number">1.5.18.1.</span> <span class="toc-text">18.1 图床</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#18-2-RSS"><span class="toc-number">1.5.18.2.</span> <span class="toc-text">18.2 RSS</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#18-3-一言API个性签名自动刷新"><span class="toc-number">1.5.18.3.</span> <span class="toc-text">18.3 一言API个性签名自动刷新</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#18-4-Google收录"><span class="toc-number">1.5.18.4.</span> <span class="toc-text">18.4 Google收录</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#18-5-Google广告投放"><span class="toc-number">1.5.18.5.</span> <span class="toc-text">18.5 Google广告投放</span></a></li></ol></li></ol></li><li class="toc-item toc-level-2"><a class="toc-link" href="#附录：参考资料"><span class="toc-number">1.6.</span> <span class="toc-text">附录：参考资料</span></a></li></ol></li></ol>
                    </div>
                </span>
            </div>
        </div>
        
    </div>
</aside>





  
  
  

  

  

  





<div id="gitalk-container" style="padding: 0px 30px 0px 30px;"></div> 

<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/gitalk@1/dist/gitalk.css">
<script src="https://cdn.jsdelivr.net/npm/gitalk@1/dist/gitalk.min.js"></script>
<script type="text/javascript">

if(true){
  var gitalk = new Gitalk({
    clientID: 'ef41cd3f6bb938f5b4c6',
    clientSecret: '0a387b3802665d8a71757a618f93dfd8cb5ec7d8',
    repo: 'Chthollists.github.io',
    owner: 'Chthollists',
    admin: ['Chthollists'],
    id: 'Tue Jul 28 2020 20:18:58 GMT+0800',
    distractionFreeMode: 'true'

})
gitalk.render('gitalk-container') 
}
</script>







          </div>
        </div>
      </div>
      <footer id="footer">
  <div class="outer">
    <div id="footer-info">
    	<div class="footer-left">
		
			<!-- # <font color="purple" face="Microsoft YaHei" size= 5><b>内容<br> </b></font> -->
			
    		<font color="red" face="Microsoft YaHei" size= 3><b>&copy; 2021 Chthollists&nbsp;&nbsp;总文章数: 48</b></font>
			<font color="red" face="Times New Roman" size= 4><b><a href="https://webify.cloudbase.net/" target="_blank" rel="noopener">&nbsp;&nbsp;Powered by CloudBase Webify</a></b></font>
    	</div>
		
      	<div class="footer-right">
		
			<!-- # PV方式，单个用户连续点击 n 篇，记录 n 次记录值 -->
			<font color="purple" face="Microsoft YaHei" size= 2><b><span id="busuanzi_container_site_pv"> 本站总访问量: <span id="busuanzi_value_site_pv"></span> &</span></b></font>
			
			<!-- # UV方式，单个用户连续点击 n 篇，记录 1 次记录值 -->
			<font color="purple" face="Microsoft YaHei" size= 2><b><span id="busuanzi_container_site_uv"> 本站总访客数: <span id="busuanzi_value_site_uv"></span></span></b></font>
			
			
			<font color="blue" face="Microsoft YaHei" size= 2><b>&nbsp;&nbsp;<a href="http://hexo.io/" target="_blank">Hexo</a>  Theme <a href="https://github.com/litten/hexo-theme-yilia" target="_blank">Yilia</a></b></font>
      		
      	</div>
    </div>
  </div>


</footer>



    </div>
    <script>
	var yiliaConfig = {
		mathjax: false,
		isHome: false,
		isPost: true,
		isArchive: false,
		isTag: false,
		isCategory: false,
		open_in_new: false,
		toc_hide_index: true,
		root: "/",
		innerArchive: true,
		showTags: false
	}
</script>

<script>!function(t){function n(e){if(r[e])return r[e].exports;var i=r[e]={exports:{},id:e,loaded:!1};return t[e].call(i.exports,i,i.exports,n),i.loaded=!0,i.exports}var r={};n.m=t,n.c=r,n.p="./",n(0)}([function(t,n,r){r(195),t.exports=r(191)},function(t,n,r){var e=r(3),i=r(52),o=r(27),u=r(28),c=r(53),f="prototype",a=function(t,n,r){var s,l,h,v,p=t&a.F,d=t&a.G,y=t&a.S,g=t&a.P,b=t&a.B,m=d?e:y?e[n]||(e[n]={}):(e[n]||{})[f],x=d?i:i[n]||(i[n]={}),w=x[f]||(x[f]={});d&&(r=n);for(s in r)l=!p&&m&&void 0!==m[s],h=(l?m:r)[s],v=b&&l?c(h,e):g&&"function"==typeof h?c(Function.call,h):h,m&&u(m,s,h,t&a.U),x[s]!=h&&o(x,s,v),g&&w[s]!=h&&(w[s]=h)};e.core=i,a.F=1,a.G=2,a.S=4,a.P=8,a.B=16,a.W=32,a.U=64,a.R=128,t.exports=a},function(t,n,r){var e=r(6);t.exports=function(t){if(!e(t))throw TypeError(t+" is not an object!");return t}},function(t,n){var r=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=r)},function(t,n){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,n){var r=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=r)},function(t,n){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,n,r){var e=r(126)("wks"),i=r(76),o=r(3).Symbol,u="function"==typeof o;(t.exports=function(t){return e[t]||(e[t]=u&&o[t]||(u?o:i)("Symbol."+t))}).store=e},function(t,n){var r={}.hasOwnProperty;t.exports=function(t,n){return r.call(t,n)}},function(t,n,r){var e=r(94),i=r(33);t.exports=function(t){return e(i(t))}},function(t,n,r){t.exports=!r(4)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(t,n,r){var e=r(2),i=r(167),o=r(50),u=Object.defineProperty;n.f=r(10)?Object.defineProperty:function(t,n,r){if(e(t),n=o(n,!0),e(r),i)try{return u(t,n,r)}catch(t){}if("get"in r||"set"in r)throw TypeError("Accessors not supported!");return"value"in r&&(t[n]=r.value),t}},function(t,n,r){t.exports=!r(18)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(t,n,r){var e=r(14),i=r(22);t.exports=r(12)?function(t,n,r){return e.f(t,n,i(1,r))}:function(t,n,r){return t[n]=r,t}},function(t,n,r){var e=r(20),i=r(58),o=r(42),u=Object.defineProperty;n.f=r(12)?Object.defineProperty:function(t,n,r){if(e(t),n=o(n,!0),e(r),i)try{return u(t,n,r)}catch(t){}if("get"in r||"set"in r)throw TypeError("Accessors not supported!");return"value"in r&&(t[n]=r.value),t}},function(t,n,r){var e=r(40)("wks"),i=r(23),o=r(5).Symbol,u="function"==typeof o;(t.exports=function(t){return e[t]||(e[t]=u&&o[t]||(u?o:i)("Symbol."+t))}).store=e},function(t,n,r){var e=r(67),i=Math.min;t.exports=function(t){return t>0?i(e(t),9007199254740991):0}},function(t,n,r){var e=r(46);t.exports=function(t){return Object(e(t))}},function(t,n){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,n,r){var e=r(63),i=r(34);t.exports=Object.keys||function(t){return e(t,i)}},function(t,n,r){var e=r(21);t.exports=function(t){if(!e(t))throw TypeError(t+" is not an object!");return t}},function(t,n){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,n){t.exports=function(t,n){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:n}}},function(t,n){var r=0,e=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++r+e).toString(36))}},function(t,n){var r={}.hasOwnProperty;t.exports=function(t,n){return r.call(t,n)}},function(t,n){var r=t.exports={version:"2.4.0"};"number"==typeof __e&&(__e=r)},function(t,n){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},function(t,n,r){var e=r(11),i=r(66);t.exports=r(10)?function(t,n,r){return e.f(t,n,i(1,r))}:function(t,n,r){return t[n]=r,t}},function(t,n,r){var e=r(3),i=r(27),o=r(24),u=r(76)("src"),c="toString",f=Function[c],a=(""+f).split(c);r(52).inspectSource=function(t){return f.call(t)},(t.exports=function(t,n,r,c){var f="function"==typeof r;f&&(o(r,"name")||i(r,"name",n)),t[n]!==r&&(f&&(o(r,u)||i(r,u,t[n]?""+t[n]:a.join(String(n)))),t===e?t[n]=r:c?t[n]?t[n]=r:i(t,n,r):(delete t[n],i(t,n,r)))})(Function.prototype,c,function(){return"function"==typeof this&&this[u]||f.call(this)})},function(t,n,r){var e=r(1),i=r(4),o=r(46),u=function(t,n,r,e){var i=String(o(t)),u="<"+n;return""!==r&&(u+=" "+r+'="'+String(e).replace(/"/g,"&quot;")+'"'),u+">"+i+"</"+n+">"};t.exports=function(t,n){var r={};r[t]=n(u),e(e.P+e.F*i(function(){var n=""[t]('"');return n!==n.toLowerCase()||n.split('"').length>3}),"String",r)}},function(t,n,r){var e=r(115),i=r(46);t.exports=function(t){return e(i(t))}},function(t,n,r){var e=r(116),i=r(66),o=r(30),u=r(50),c=r(24),f=r(167),a=Object.getOwnPropertyDescriptor;n.f=r(10)?a:function(t,n){if(t=o(t),n=u(n,!0),f)try{return a(t,n)}catch(t){}if(c(t,n))return i(!e.f.call(t,n),t[n])}},function(t,n,r){var e=r(24),i=r(17),o=r(145)("IE_PROTO"),u=Object.prototype;t.exports=Object.getPrototypeOf||function(t){return t=i(t),e(t,o)?t[o]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?u:null}},function(t,n){t.exports=function(t){if(void 0==t)throw TypeError("Can't call method on  "+t);return t}},function(t,n){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(t,n){t.exports={}},function(t,n){t.exports=!0},function(t,n){n.f={}.propertyIsEnumerable},function(t,n,r){var e=r(14).f,i=r(8),o=r(15)("toStringTag");t.exports=function(t,n,r){t&&!i(t=r?t:t.prototype,o)&&e(t,o,{configurable:!0,value:n})}},function(t,n,r){var e=r(40)("keys"),i=r(23);t.exports=function(t){return e[t]||(e[t]=i(t))}},function(t,n,r){var e=r(5),i="__core-js_shared__",o=e[i]||(e[i]={});t.exports=function(t){return o[t]||(o[t]={})}},function(t,n){var r=Math.ceil,e=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?e:r)(t)}},function(t,n,r){var e=r(21);t.exports=function(t,n){if(!e(t))return t;var r,i;if(n&&"function"==typeof(r=t.toString)&&!e(i=r.call(t)))return i;if("function"==typeof(r=t.valueOf)&&!e(i=r.call(t)))return i;if(!n&&"function"==typeof(r=t.toString)&&!e(i=r.call(t)))return i;throw TypeError("Can't convert object to primitive value")}},function(t,n,r){var e=r(5),i=r(25),o=r(36),u=r(44),c=r(14).f;t.exports=function(t){var n=i.Symbol||(i.Symbol=o?{}:e.Symbol||{});"_"==t.charAt(0)||t in n||c(n,t,{value:u.f(t)})}},function(t,n,r){n.f=r(15)},function(t,n){var r={}.toString;t.exports=function(t){return r.call(t).slice(8,-1)}},function(t,n){t.exports=function(t){if(void 0==t)throw TypeError("Can't call method on  "+t);return t}},function(t,n,r){var e=r(4);t.exports=function(t,n){return!!t&&e(function(){n?t.call(null,function(){},1):t.call(null)})}},function(t,n,r){var e=r(53),i=r(115),o=r(17),u=r(16),c=r(203);t.exports=function(t,n){var r=1==t,f=2==t,a=3==t,s=4==t,l=6==t,h=5==t||l,v=n||c;return function(n,c,p){for(var d,y,g=o(n),b=i(g),m=e(c,p,3),x=u(b.length),w=0,S=r?v(n,x):f?v(n,0):void 0;x>w;w++)if((h||w in b)&&(d=b[w],y=m(d,w,g),t))if(r)S[w]=y;else if(y)switch(t){case 3:return!0;case 5:return d;case 6:return w;case 2:S.push(d)}else if(s)return!1;return l?-1:a||s?s:S}}},function(t,n,r){var e=r(1),i=r(52),o=r(4);t.exports=function(t,n){var r=(i.Object||{})[t]||Object[t],u={};u[t]=n(r),e(e.S+e.F*o(function(){r(1)}),"Object",u)}},function(t,n,r){var e=r(6);t.exports=function(t,n){if(!e(t))return t;var r,i;if(n&&"function"==typeof(r=t.toString)&&!e(i=r.call(t)))return i;if("function"==typeof(r=t.valueOf)&&!e(i=r.call(t)))return i;if(!n&&"function"==typeof(r=t.toString)&&!e(i=r.call(t)))return i;throw TypeError("Can't convert object to primitive value")}},function(t,n,r){var e=r(5),i=r(25),o=r(91),u=r(13),c="prototype",f=function(t,n,r){var a,s,l,h=t&f.F,v=t&f.G,p=t&f.S,d=t&f.P,y=t&f.B,g=t&f.W,b=v?i:i[n]||(i[n]={}),m=b[c],x=v?e:p?e[n]:(e[n]||{})[c];v&&(r=n);for(a in r)(s=!h&&x&&void 0!==x[a])&&a in b||(l=s?x[a]:r[a],b[a]=v&&"function"!=typeof x[a]?r[a]:y&&s?o(l,e):g&&x[a]==l?function(t){var n=function(n,r,e){if(this instanceof t){switch(arguments.length){case 0:return new t;case 1:return new t(n);case 2:return new t(n,r)}return new t(n,r,e)}return t.apply(this,arguments)};return n[c]=t[c],n}(l):d&&"function"==typeof l?o(Function.call,l):l,d&&((b.virtual||(b.virtual={}))[a]=l,t&f.R&&m&&!m[a]&&u(m,a,l)))};f.F=1,f.G=2,f.S=4,f.P=8,f.B=16,f.W=32,f.U=64,f.R=128,t.exports=f},function(t,n){var r=t.exports={version:"2.4.0"};"number"==typeof __e&&(__e=r)},function(t,n,r){var e=r(26);t.exports=function(t,n,r){if(e(t),void 0===n)return t;switch(r){case 1:return function(r){return t.call(n,r)};case 2:return function(r,e){return t.call(n,r,e)};case 3:return function(r,e,i){return t.call(n,r,e,i)}}return function(){return t.apply(n,arguments)}}},function(t,n,r){var e=r(183),i=r(1),o=r(126)("metadata"),u=o.store||(o.store=new(r(186))),c=function(t,n,r){var i=u.get(t);if(!i){if(!r)return;u.set(t,i=new e)}var o=i.get(n);if(!o){if(!r)return;i.set(n,o=new e)}return o},f=function(t,n,r){var e=c(n,r,!1);return void 0!==e&&e.has(t)},a=function(t,n,r){var e=c(n,r,!1);return void 0===e?void 0:e.get(t)},s=function(t,n,r,e){c(r,e,!0).set(t,n)},l=function(t,n){var r=c(t,n,!1),e=[];return r&&r.forEach(function(t,n){e.push(n)}),e},h=function(t){return void 0===t||"symbol"==typeof t?t:String(t)},v=function(t){i(i.S,"Reflect",t)};t.exports={store:u,map:c,has:f,get:a,set:s,keys:l,key:h,exp:v}},function(t,n,r){"use strict";if(r(10)){var e=r(69),i=r(3),o=r(4),u=r(1),c=r(127),f=r(152),a=r(53),s=r(68),l=r(66),h=r(27),v=r(73),p=r(67),d=r(16),y=r(75),g=r(50),b=r(24),m=r(180),x=r(114),w=r(6),S=r(17),_=r(137),O=r(70),E=r(32),P=r(71).f,j=r(154),F=r(76),M=r(7),A=r(48),N=r(117),T=r(146),I=r(155),k=r(80),L=r(123),R=r(74),C=r(130),D=r(160),U=r(11),W=r(31),G=U.f,B=W.f,V=i.RangeError,z=i.TypeError,q=i.Uint8Array,K="ArrayBuffer",J="Shared"+K,Y="BYTES_PER_ELEMENT",H="prototype",$=Array[H],X=f.ArrayBuffer,Q=f.DataView,Z=A(0),tt=A(2),nt=A(3),rt=A(4),et=A(5),it=A(6),ot=N(!0),ut=N(!1),ct=I.values,ft=I.keys,at=I.entries,st=$.lastIndexOf,lt=$.reduce,ht=$.reduceRight,vt=$.join,pt=$.sort,dt=$.slice,yt=$.toString,gt=$.toLocaleString,bt=M("iterator"),mt=M("toStringTag"),xt=F("typed_constructor"),wt=F("def_constructor"),St=c.CONSTR,_t=c.TYPED,Ot=c.VIEW,Et="Wrong length!",Pt=A(1,function(t,n){return Tt(T(t,t[wt]),n)}),jt=o(function(){return 1===new q(new Uint16Array([1]).buffer)[0]}),Ft=!!q&&!!q[H].set&&o(function(){new q(1).set({})}),Mt=function(t,n){if(void 0===t)throw z(Et);var r=+t,e=d(t);if(n&&!m(r,e))throw V(Et);return e},At=function(t,n){var r=p(t);if(r<0||r%n)throw V("Wrong offset!");return r},Nt=function(t){if(w(t)&&_t in t)return t;throw z(t+" is not a typed array!")},Tt=function(t,n){if(!(w(t)&&xt in t))throw z("It is not a typed array constructor!");return new t(n)},It=function(t,n){return kt(T(t,t[wt]),n)},kt=function(t,n){for(var r=0,e=n.length,i=Tt(t,e);e>r;)i[r]=n[r++];return i},Lt=function(t,n,r){G(t,n,{get:function(){return this._d[r]}})},Rt=function(t){var n,r,e,i,o,u,c=S(t),f=arguments.length,s=f>1?arguments[1]:void 0,l=void 0!==s,h=j(c);if(void 0!=h&&!_(h)){for(u=h.call(c),e=[],n=0;!(o=u.next()).done;n++)e.push(o.value);c=e}for(l&&f>2&&(s=a(s,arguments[2],2)),n=0,r=d(c.length),i=Tt(this,r);r>n;n++)i[n]=l?s(c[n],n):c[n];return i},Ct=function(){for(var t=0,n=arguments.length,r=Tt(this,n);n>t;)r[t]=arguments[t++];return r},Dt=!!q&&o(function(){gt.call(new q(1))}),Ut=function(){return gt.apply(Dt?dt.call(Nt(this)):Nt(this),arguments)},Wt={copyWithin:function(t,n){return D.call(Nt(this),t,n,arguments.length>2?arguments[2]:void 0)},every:function(t){return rt(Nt(this),t,arguments.length>1?arguments[1]:void 0)},fill:function(t){return C.apply(Nt(this),arguments)},filter:function(t){return It(this,tt(Nt(this),t,arguments.length>1?arguments[1]:void 0))},find:function(t){return et(Nt(this),t,arguments.length>1?arguments[1]:void 0)},findIndex:function(t){return it(Nt(this),t,arguments.length>1?arguments[1]:void 0)},forEach:function(t){Z(Nt(this),t,arguments.length>1?arguments[1]:void 0)},indexOf:function(t){return ut(Nt(this),t,arguments.length>1?arguments[1]:void 0)},includes:function(t){return ot(Nt(this),t,arguments.length>1?arguments[1]:void 0)},join:function(t){return vt.apply(Nt(this),arguments)},lastIndexOf:function(t){return st.apply(Nt(this),arguments)},map:function(t){return Pt(Nt(this),t,arguments.length>1?arguments[1]:void 0)},reduce:function(t){return lt.apply(Nt(this),arguments)},reduceRight:function(t){return ht.apply(Nt(this),arguments)},reverse:function(){for(var t,n=this,r=Nt(n).length,e=Math.floor(r/2),i=0;i<e;)t=n[i],n[i++]=n[--r],n[r]=t;return n},some:function(t){return nt(Nt(this),t,arguments.length>1?arguments[1]:void 0)},sort:function(t){return pt.call(Nt(this),t)},subarray:function(t,n){var r=Nt(this),e=r.length,i=y(t,e);return new(T(r,r[wt]))(r.buffer,r.byteOffset+i*r.BYTES_PER_ELEMENT,d((void 0===n?e:y(n,e))-i))}},Gt=function(t,n){return It(this,dt.call(Nt(this),t,n))},Bt=function(t){Nt(this);var n=At(arguments[1],1),r=this.length,e=S(t),i=d(e.length),o=0;if(i+n>r)throw V(Et);for(;o<i;)this[n+o]=e[o++]},Vt={entries:function(){return at.call(Nt(this))},keys:function(){return ft.call(Nt(this))},values:function(){return ct.call(Nt(this))}},zt=function(t,n){return w(t)&&t[_t]&&"symbol"!=typeof n&&n in t&&String(+n)==String(n)},qt=function(t,n){return zt(t,n=g(n,!0))?l(2,t[n]):B(t,n)},Kt=function(t,n,r){return!(zt(t,n=g(n,!0))&&w(r)&&b(r,"value"))||b(r,"get")||b(r,"set")||r.configurable||b(r,"writable")&&!r.writable||b(r,"enumerable")&&!r.enumerable?G(t,n,r):(t[n]=r.value,t)};St||(W.f=qt,U.f=Kt),u(u.S+u.F*!St,"Object",{getOwnPropertyDescriptor:qt,defineProperty:Kt}),o(function(){yt.call({})})&&(yt=gt=function(){return vt.call(this)});var Jt=v({},Wt);v(Jt,Vt),h(Jt,bt,Vt.values),v(Jt,{slice:Gt,set:Bt,constructor:function(){},toString:yt,toLocaleString:Ut}),Lt(Jt,"buffer","b"),Lt(Jt,"byteOffset","o"),Lt(Jt,"byteLength","l"),Lt(Jt,"length","e"),G(Jt,mt,{get:function(){return this[_t]}}),t.exports=function(t,n,r,f){f=!!f;var a=t+(f?"Clamped":"")+"Array",l="Uint8Array"!=a,v="get"+t,p="set"+t,y=i[a],g=y||{},b=y&&E(y),m=!y||!c.ABV,S={},_=y&&y[H],j=function(t,r){var e=t._d;return e.v[v](r*n+e.o,jt)},F=function(t,r,e){var i=t._d;f&&(e=(e=Math.round(e))<0?0:e>255?255:255&e),i.v[p](r*n+i.o,e,jt)},M=function(t,n){G(t,n,{get:function(){return j(this,n)},set:function(t){return F(this,n,t)},enumerable:!0})};m?(y=r(function(t,r,e,i){s(t,y,a,"_d");var o,u,c,f,l=0,v=0;if(w(r)){if(!(r instanceof X||(f=x(r))==K||f==J))return _t in r?kt(y,r):Rt.call(y,r);o=r,v=At(e,n);var p=r.byteLength;if(void 0===i){if(p%n)throw V(Et);if((u=p-v)<0)throw V(Et)}else if((u=d(i)*n)+v>p)throw V(Et);c=u/n}else c=Mt(r,!0),u=c*n,o=new X(u);for(h(t,"_d",{b:o,o:v,l:u,e:c,v:new Q(o)});l<c;)M(t,l++)}),_=y[H]=O(Jt),h(_,"constructor",y)):L(function(t){new y(null),new y(t)},!0)||(y=r(function(t,r,e,i){s(t,y,a);var o;return w(r)?r instanceof X||(o=x(r))==K||o==J?void 0!==i?new g(r,At(e,n),i):void 0!==e?new g(r,At(e,n)):new g(r):_t in r?kt(y,r):Rt.call(y,r):new g(Mt(r,l))}),Z(b!==Function.prototype?P(g).concat(P(b)):P(g),function(t){t in y||h(y,t,g[t])}),y[H]=_,e||(_.constructor=y));var A=_[bt],N=!!A&&("values"==A.name||void 0==A.name),T=Vt.values;h(y,xt,!0),h(_,_t,a),h(_,Ot,!0),h(_,wt,y),(f?new y(1)[mt]==a:mt in _)||G(_,mt,{get:function(){return a}}),S[a]=y,u(u.G+u.W+u.F*(y!=g),S),u(u.S,a,{BYTES_PER_ELEMENT:n,from:Rt,of:Ct}),Y in _||h(_,Y,n),u(u.P,a,Wt),R(a),u(u.P+u.F*Ft,a,{set:Bt}),u(u.P+u.F*!N,a,Vt),u(u.P+u.F*(_.toString!=yt),a,{toString:yt}),u(u.P+u.F*o(function(){new y(1).slice()}),a,{slice:Gt}),u(u.P+u.F*(o(function(){return[1,2].toLocaleString()!=new y([1,2]).toLocaleString()})||!o(function(){_.toLocaleString.call([1,2])})),a,{toLocaleString:Ut}),k[a]=N?A:T,e||N||h(_,bt,T)}}else t.exports=function(){}},function(t,n){var r={}.toString;t.exports=function(t){return r.call(t).slice(8,-1)}},function(t,n,r){var e=r(21),i=r(5).document,o=e(i)&&e(i.createElement);t.exports=function(t){return o?i.createElement(t):{}}},function(t,n,r){t.exports=!r(12)&&!r(18)(function(){return 7!=Object.defineProperty(r(57)("div"),"a",{get:function(){return 7}}).a})},function(t,n,r){"use strict";var e=r(36),i=r(51),o=r(64),u=r(13),c=r(8),f=r(35),a=r(96),s=r(38),l=r(103),h=r(15)("iterator"),v=!([].keys&&"next"in[].keys()),p="keys",d="values",y=function(){return this};t.exports=function(t,n,r,g,b,m,x){a(r,n,g);var w,S,_,O=function(t){if(!v&&t in F)return F[t];switch(t){case p:case d:return function(){return new r(this,t)}}return function(){return new r(this,t)}},E=n+" Iterator",P=b==d,j=!1,F=t.prototype,M=F[h]||F["@@iterator"]||b&&F[b],A=M||O(b),N=b?P?O("entries"):A:void 0,T="Array"==n?F.entries||M:M;if(T&&(_=l(T.call(new t)))!==Object.prototype&&(s(_,E,!0),e||c(_,h)||u(_,h,y)),P&&M&&M.name!==d&&(j=!0,A=function(){return M.call(this)}),e&&!x||!v&&!j&&F[h]||u(F,h,A),f[n]=A,f[E]=y,b)if(w={values:P?A:O(d),keys:m?A:O(p),entries:N},x)for(S in w)S in F||o(F,S,w[S]);else i(i.P+i.F*(v||j),n,w);return w}},function(t,n,r){var e=r(20),i=r(100),o=r(34),u=r(39)("IE_PROTO"),c=function(){},f="prototype",a=function(){var t,n=r(57)("iframe"),e=o.length;for(n.style.display="none",r(93).appendChild(n),n.src="javascript:",t=n.contentWindow.document,t.open(),t.write("<script>document.F=Object<\/script>"),t.close(),a=t.F;e--;)delete a[f][o[e]];return a()};t.exports=Object.create||function(t,n){var r;return null!==t?(c[f]=e(t),r=new c,c[f]=null,r[u]=t):r=a(),void 0===n?r:i(r,n)}},function(t,n,r){var e=r(63),i=r(34).concat("length","prototype");n.f=Object.getOwnPropertyNames||function(t){return e(t,i)}},function(t,n){n.f=Object.getOwnPropertySymbols},function(t,n,r){var e=r(8),i=r(9),o=r(90)(!1),u=r(39)("IE_PROTO");t.exports=function(t,n){var r,c=i(t),f=0,a=[];for(r in c)r!=u&&e(c,r)&&a.push(r);for(;n.length>f;)e(c,r=n[f++])&&(~o(a,r)||a.push(r));return a}},function(t,n,r){t.exports=r(13)},function(t,n,r){var e=r(76)("meta"),i=r(6),o=r(24),u=r(11).f,c=0,f=Object.isExtensible||function(){return!0},a=!r(4)(function(){return f(Object.preventExtensions({}))}),s=function(t){u(t,e,{value:{i:"O"+ ++c,w:{}}})},l=function(t,n){if(!i(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!o(t,e)){if(!f(t))return"F";if(!n)return"E";s(t)}return t[e].i},h=function(t,n){if(!o(t,e)){if(!f(t))return!0;if(!n)return!1;s(t)}return t[e].w},v=function(t){return a&&p.NEED&&f(t)&&!o(t,e)&&s(t),t},p=t.exports={KEY:e,NEED:!1,fastKey:l,getWeak:h,onFreeze:v}},function(t,n){t.exports=function(t,n){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:n}}},function(t,n){var r=Math.ceil,e=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?e:r)(t)}},function(t,n){t.exports=function(t,n,r,e){if(!(t instanceof n)||void 0!==e&&e in t)throw TypeError(r+": incorrect invocation!");return t}},function(t,n){t.exports=!1},function(t,n,r){var e=r(2),i=r(173),o=r(133),u=r(145)("IE_PROTO"),c=function(){},f="prototype",a=function(){var t,n=r(132)("iframe"),e=o.length;for(n.style.display="none",r(135).appendChild(n),n.src="javascript:",t=n.contentWindow.document,t.open(),t.write("<script>document.F=Object<\/script>"),t.close(),a=t.F;e--;)delete a[f][o[e]];return a()};t.exports=Object.create||function(t,n){var r;return null!==t?(c[f]=e(t),r=new c,c[f]=null,r[u]=t):r=a(),void 0===n?r:i(r,n)}},function(t,n,r){var e=r(175),i=r(133).concat("length","prototype");n.f=Object.getOwnPropertyNames||function(t){return e(t,i)}},function(t,n,r){var e=r(175),i=r(133);t.exports=Object.keys||function(t){return e(t,i)}},function(t,n,r){var e=r(28);t.exports=function(t,n,r){for(var i in n)e(t,i,n[i],r);return t}},function(t,n,r){"use strict";var e=r(3),i=r(11),o=r(10),u=r(7)("species");t.exports=function(t){var n=e[t];o&&n&&!n[u]&&i.f(n,u,{configurable:!0,get:function(){return this}})}},function(t,n,r){var e=r(67),i=Math.max,o=Math.min;t.exports=function(t,n){return t=e(t),t<0?i(t+n,0):o(t,n)}},function(t,n){var r=0,e=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++r+e).toString(36))}},function(t,n,r){var e=r(33);t.exports=function(t){return Object(e(t))}},function(t,n,r){var e=r(7)("unscopables"),i=Array.prototype;void 0==i[e]&&r(27)(i,e,{}),t.exports=function(t){i[e][t]=!0}},function(t,n,r){var e=r(53),i=r(169),o=r(137),u=r(2),c=r(16),f=r(154),a={},s={},n=t.exports=function(t,n,r,l,h){var v,p,d,y,g=h?function(){return t}:f(t),b=e(r,l,n?2:1),m=0;if("function"!=typeof g)throw TypeError(t+" is not iterable!");if(o(g)){for(v=c(t.length);v>m;m++)if((y=n?b(u(p=t[m])[0],p[1]):b(t[m]))===a||y===s)return y}else for(d=g.call(t);!(p=d.next()).done;)if((y=i(d,b,p.value,n))===a||y===s)return y};n.BREAK=a,n.RETURN=s},function(t,n){t.exports={}},function(t,n,r){var e=r(11).f,i=r(24),o=r(7)("toStringTag");t.exports=function(t,n,r){t&&!i(t=r?t:t.prototype,o)&&e(t,o,{configurable:!0,value:n})}},function(t,n,r){var e=r(1),i=r(46),o=r(4),u=r(150),c="["+u+"]",f="​",a=RegExp("^"+c+c+"*"),s=RegExp(c+c+"*$"),l=function(t,n,r){var i={},c=o(function(){return!!u[t]()||f[t]()!=f}),a=i[t]=c?n(h):u[t];r&&(i[r]=a),e(e.P+e.F*c,"String",i)},h=l.trim=function(t,n){return t=String(i(t)),1&n&&(t=t.replace(a,"")),2&n&&(t=t.replace(s,"")),t};t.exports=l},function(t,n,r){t.exports={default:r(86),__esModule:!0}},function(t,n,r){t.exports={default:r(87),__esModule:!0}},function(t,n,r){"use strict";function e(t){return t&&t.__esModule?t:{default:t}}n.__esModule=!0;var i=r(84),o=e(i),u=r(83),c=e(u),f="function"==typeof c.default&&"symbol"==typeof o.default?function(t){return typeof t}:function(t){return t&&"function"==typeof c.default&&t.constructor===c.default&&t!==c.default.prototype?"symbol":typeof t};n.default="function"==typeof c.default&&"symbol"===f(o.default)?function(t){return void 0===t?"undefined":f(t)}:function(t){return t&&"function"==typeof c.default&&t.constructor===c.default&&t!==c.default.prototype?"symbol":void 0===t?"undefined":f(t)}},function(t,n,r){r(110),r(108),r(111),r(112),t.exports=r(25).Symbol},function(t,n,r){r(109),r(113),t.exports=r(44).f("iterator")},function(t,n){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},function(t,n){t.exports=function(){}},function(t,n,r){var e=r(9),i=r(106),o=r(105);t.exports=function(t){return function(n,r,u){var c,f=e(n),a=i(f.length),s=o(u,a);if(t&&r!=r){for(;a>s;)if((c=f[s++])!=c)return!0}else for(;a>s;s++)if((t||s in f)&&f[s]===r)return t||s||0;return!t&&-1}}},function(t,n,r){var e=r(88);t.exports=function(t,n,r){if(e(t),void 0===n)return t;switch(r){case 1:return function(r){return t.call(n,r)};case 2:return function(r,e){return t.call(n,r,e)};case 3:return function(r,e,i){return t.call(n,r,e,i)}}return function(){return t.apply(n,arguments)}}},function(t,n,r){var e=r(19),i=r(62),o=r(37);t.exports=function(t){var n=e(t),r=i.f;if(r)for(var u,c=r(t),f=o.f,a=0;c.length>a;)f.call(t,u=c[a++])&&n.push(u);return n}},function(t,n,r){t.exports=r(5).document&&document.documentElement},function(t,n,r){var e=r(56);t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==e(t)?t.split(""):Object(t)}},function(t,n,r){var e=r(56);t.exports=Array.isArray||function(t){return"Array"==e(t)}},function(t,n,r){"use strict";var e=r(60),i=r(22),o=r(38),u={};r(13)(u,r(15)("iterator"),function(){return this}),t.exports=function(t,n,r){t.prototype=e(u,{next:i(1,r)}),o(t,n+" Iterator")}},function(t,n){t.exports=function(t,n){return{value:n,done:!!t}}},function(t,n,r){var e=r(19),i=r(9);t.exports=function(t,n){for(var r,o=i(t),u=e(o),c=u.length,f=0;c>f;)if(o[r=u[f++]]===n)return r}},function(t,n,r){var e=r(23)("meta"),i=r(21),o=r(8),u=r(14).f,c=0,f=Object.isExtensible||function(){return!0},a=!r(18)(function(){return f(Object.preventExtensions({}))}),s=function(t){u(t,e,{value:{i:"O"+ ++c,w:{}}})},l=function(t,n){if(!i(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!o(t,e)){if(!f(t))return"F";if(!n)return"E";s(t)}return t[e].i},h=function(t,n){if(!o(t,e)){if(!f(t))return!0;if(!n)return!1;s(t)}return t[e].w},v=function(t){return a&&p.NEED&&f(t)&&!o(t,e)&&s(t),t},p=t.exports={KEY:e,NEED:!1,fastKey:l,getWeak:h,onFreeze:v}},function(t,n,r){var e=r(14),i=r(20),o=r(19);t.exports=r(12)?Object.defineProperties:function(t,n){i(t);for(var r,u=o(n),c=u.length,f=0;c>f;)e.f(t,r=u[f++],n[r]);return t}},function(t,n,r){var e=r(37),i=r(22),o=r(9),u=r(42),c=r(8),f=r(58),a=Object.getOwnPropertyDescriptor;n.f=r(12)?a:function(t,n){if(t=o(t),n=u(n,!0),f)try{return a(t,n)}catch(t){}if(c(t,n))return i(!e.f.call(t,n),t[n])}},function(t,n,r){var e=r(9),i=r(61).f,o={}.toString,u="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],c=function(t){try{return i(t)}catch(t){return u.slice()}};t.exports.f=function(t){return u&&"[object Window]"==o.call(t)?c(t):i(e(t))}},function(t,n,r){var e=r(8),i=r(77),o=r(39)("IE_PROTO"),u=Object.prototype;t.exports=Object.getPrototypeOf||function(t){return t=i(t),e(t,o)?t[o]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?u:null}},function(t,n,r){var e=r(41),i=r(33);t.exports=function(t){return function(n,r){var o,u,c=String(i(n)),f=e(r),a=c.length;return f<0||f>=a?t?"":void 0:(o=c.charCodeAt(f),o<55296||o>56319||f+1===a||(u=c.charCodeAt(f+1))<56320||u>57343?t?c.charAt(f):o:t?c.slice(f,f+2):u-56320+(o-55296<<10)+65536)}}},function(t,n,r){var e=r(41),i=Math.max,o=Math.min;t.exports=function(t,n){return t=e(t),t<0?i(t+n,0):o(t,n)}},function(t,n,r){var e=r(41),i=Math.min;t.exports=function(t){return t>0?i(e(t),9007199254740991):0}},function(t,n,r){"use strict";var e=r(89),i=r(97),o=r(35),u=r(9);t.exports=r(59)(Array,"Array",function(t,n){this._t=u(t),this._i=0,this._k=n},function(){var t=this._t,n=this._k,r=this._i++;return!t||r>=t.length?(this._t=void 0,i(1)):"keys"==n?i(0,r):"values"==n?i(0,t[r]):i(0,[r,t[r]])},"values"),o.Arguments=o.Array,e("keys"),e("values"),e("entries")},function(t,n){},function(t,n,r){"use strict";var e=r(104)(!0);r(59)(String,"String",function(t){this._t=String(t),this._i=0},function(){var t,n=this._t,r=this._i;return r>=n.length?{value:void 0,done:!0}:(t=e(n,r),this._i+=t.length,{value:t,done:!1})})},function(t,n,r){"use strict";var e=r(5),i=r(8),o=r(12),u=r(51),c=r(64),f=r(99).KEY,a=r(18),s=r(40),l=r(38),h=r(23),v=r(15),p=r(44),d=r(43),y=r(98),g=r(92),b=r(95),m=r(20),x=r(9),w=r(42),S=r(22),_=r(60),O=r(102),E=r(101),P=r(14),j=r(19),F=E.f,M=P.f,A=O.f,N=e.Symbol,T=e.JSON,I=T&&T.stringify,k="prototype",L=v("_hidden"),R=v("toPrimitive"),C={}.propertyIsEnumerable,D=s("symbol-registry"),U=s("symbols"),W=s("op-symbols"),G=Object[k],B="function"==typeof N,V=e.QObject,z=!V||!V[k]||!V[k].findChild,q=o&&a(function(){return 7!=_(M({},"a",{get:function(){return M(this,"a",{value:7}).a}})).a})?function(t,n,r){var e=F(G,n);e&&delete G[n],M(t,n,r),e&&t!==G&&M(G,n,e)}:M,K=function(t){var n=U[t]=_(N[k]);return n._k=t,n},J=B&&"symbol"==typeof N.iterator?function(t){return"symbol"==typeof t}:function(t){return t instanceof N},Y=function(t,n,r){return t===G&&Y(W,n,r),m(t),n=w(n,!0),m(r),i(U,n)?(r.enumerable?(i(t,L)&&t[L][n]&&(t[L][n]=!1),r=_(r,{enumerable:S(0,!1)})):(i(t,L)||M(t,L,S(1,{})),t[L][n]=!0),q(t,n,r)):M(t,n,r)},H=function(t,n){m(t);for(var r,e=g(n=x(n)),i=0,o=e.length;o>i;)Y(t,r=e[i++],n[r]);return t},$=function(t,n){return void 0===n?_(t):H(_(t),n)},X=function(t){var n=C.call(this,t=w(t,!0));return!(this===G&&i(U,t)&&!i(W,t))&&(!(n||!i(this,t)||!i(U,t)||i(this,L)&&this[L][t])||n)},Q=function(t,n){if(t=x(t),n=w(n,!0),t!==G||!i(U,n)||i(W,n)){var r=F(t,n);return!r||!i(U,n)||i(t,L)&&t[L][n]||(r.enumerable=!0),r}},Z=function(t){for(var n,r=A(x(t)),e=[],o=0;r.length>o;)i(U,n=r[o++])||n==L||n==f||e.push(n);return e},tt=function(t){for(var n,r=t===G,e=A(r?W:x(t)),o=[],u=0;e.length>u;)!i(U,n=e[u++])||r&&!i(G,n)||o.push(U[n]);return o};B||(N=function(){if(this instanceof N)throw TypeError("Symbol is not a constructor!");var t=h(arguments.length>0?arguments[0]:void 0),n=function(r){this===G&&n.call(W,r),i(this,L)&&i(this[L],t)&&(this[L][t]=!1),q(this,t,S(1,r))};return o&&z&&q(G,t,{configurable:!0,set:n}),K(t)},c(N[k],"toString",function(){return this._k}),E.f=Q,P.f=Y,r(61).f=O.f=Z,r(37).f=X,r(62).f=tt,o&&!r(36)&&c(G,"propertyIsEnumerable",X,!0),p.f=function(t){return K(v(t))}),u(u.G+u.W+u.F*!B,{Symbol:N});for(var nt="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),rt=0;nt.length>rt;)v(nt[rt++]);for(var nt=j(v.store),rt=0;nt.length>rt;)d(nt[rt++]);u(u.S+u.F*!B,"Symbol",{for:function(t){return i(D,t+="")?D[t]:D[t]=N(t)},keyFor:function(t){if(J(t))return y(D,t);throw TypeError(t+" is not a symbol!")},useSetter:function(){z=!0},useSimple:function(){z=!1}}),u(u.S+u.F*!B,"Object",{create:$,defineProperty:Y,defineProperties:H,getOwnPropertyDescriptor:Q,getOwnPropertyNames:Z,getOwnPropertySymbols:tt}),T&&u(u.S+u.F*(!B||a(function(){var t=N();return"[null]"!=I([t])||"{}"!=I({a:t})||"{}"!=I(Object(t))})),"JSON",{stringify:function(t){if(void 0!==t&&!J(t)){for(var n,r,e=[t],i=1;arguments.length>i;)e.push(arguments[i++]);return n=e[1],"function"==typeof n&&(r=n),!r&&b(n)||(n=function(t,n){if(r&&(n=r.call(this,t,n)),!J(n))return n}),e[1]=n,I.apply(T,e)}}}),N[k][R]||r(13)(N[k],R,N[k].valueOf),l(N,"Symbol"),l(Math,"Math",!0),l(e.JSON,"JSON",!0)},function(t,n,r){r(43)("asyncIterator")},function(t,n,r){r(43)("observable")},function(t,n,r){r(107);for(var e=r(5),i=r(13),o=r(35),u=r(15)("toStringTag"),c=["NodeList","DOMTokenList","MediaList","StyleSheetList","CSSRuleList"],f=0;f<5;f++){var a=c[f],s=e[a],l=s&&s.prototype;l&&!l[u]&&i(l,u,a),o[a]=o.Array}},function(t,n,r){var e=r(45),i=r(7)("toStringTag"),o="Arguments"==e(function(){return arguments}()),u=function(t,n){try{return t[n]}catch(t){}};t.exports=function(t){var n,r,c;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(r=u(n=Object(t),i))?r:o?e(n):"Object"==(c=e(n))&&"function"==typeof n.callee?"Arguments":c}},function(t,n,r){var e=r(45);t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==e(t)?t.split(""):Object(t)}},function(t,n){n.f={}.propertyIsEnumerable},function(t,n,r){var e=r(30),i=r(16),o=r(75);t.exports=function(t){return function(n,r,u){var c,f=e(n),a=i(f.length),s=o(u,a);if(t&&r!=r){for(;a>s;)if((c=f[s++])!=c)return!0}else for(;a>s;s++)if((t||s in f)&&f[s]===r)return t||s||0;return!t&&-1}}},function(t,n,r){"use strict";var e=r(3),i=r(1),o=r(28),u=r(73),c=r(65),f=r(79),a=r(68),s=r(6),l=r(4),h=r(123),v=r(81),p=r(136);t.exports=function(t,n,r,d,y,g){var b=e[t],m=b,x=y?"set":"add",w=m&&m.prototype,S={},_=function(t){var n=w[t];o(w,t,"delete"==t?function(t){return!(g&&!s(t))&&n.call(this,0===t?0:t)}:"has"==t?function(t){return!(g&&!s(t))&&n.call(this,0===t?0:t)}:"get"==t?function(t){return g&&!s(t)?void 0:n.call(this,0===t?0:t)}:"add"==t?function(t){return n.call(this,0===t?0:t),this}:function(t,r){return n.call(this,0===t?0:t,r),this})};if("function"==typeof m&&(g||w.forEach&&!l(function(){(new m).entries().next()}))){var O=new m,E=O[x](g?{}:-0,1)!=O,P=l(function(){O.has(1)}),j=h(function(t){new m(t)}),F=!g&&l(function(){for(var t=new m,n=5;n--;)t[x](n,n);return!t.has(-0)});j||(m=n(function(n,r){a(n,m,t);var e=p(new b,n,m);return void 0!=r&&f(r,y,e[x],e),e}),m.prototype=w,w.constructor=m),(P||F)&&(_("delete"),_("has"),y&&_("get")),(F||E)&&_(x),g&&w.clear&&delete w.clear}else m=d.getConstructor(n,t,y,x),u(m.prototype,r),c.NEED=!0;return v(m,t),S[t]=m,i(i.G+i.W+i.F*(m!=b),S),g||d.setStrong(m,t,y),m}},function(t,n,r){"use strict";var e=r(27),i=r(28),o=r(4),u=r(46),c=r(7);t.exports=function(t,n,r){var f=c(t),a=r(u,f,""[t]),s=a[0],l=a[1];o(function(){var n={};return n[f]=function(){return 7},7!=""[t](n)})&&(i(String.prototype,t,s),e(RegExp.prototype,f,2==n?function(t,n){return l.call(t,this,n)}:function(t){return l.call(t,this)}))}
},function(t,n,r){"use strict";var e=r(2);t.exports=function(){var t=e(this),n="";return t.global&&(n+="g"),t.ignoreCase&&(n+="i"),t.multiline&&(n+="m"),t.unicode&&(n+="u"),t.sticky&&(n+="y"),n}},function(t,n){t.exports=function(t,n,r){var e=void 0===r;switch(n.length){case 0:return e?t():t.call(r);case 1:return e?t(n[0]):t.call(r,n[0]);case 2:return e?t(n[0],n[1]):t.call(r,n[0],n[1]);case 3:return e?t(n[0],n[1],n[2]):t.call(r,n[0],n[1],n[2]);case 4:return e?t(n[0],n[1],n[2],n[3]):t.call(r,n[0],n[1],n[2],n[3])}return t.apply(r,n)}},function(t,n,r){var e=r(6),i=r(45),o=r(7)("match");t.exports=function(t){var n;return e(t)&&(void 0!==(n=t[o])?!!n:"RegExp"==i(t))}},function(t,n,r){var e=r(7)("iterator"),i=!1;try{var o=[7][e]();o.return=function(){i=!0},Array.from(o,function(){throw 2})}catch(t){}t.exports=function(t,n){if(!n&&!i)return!1;var r=!1;try{var o=[7],u=o[e]();u.next=function(){return{done:r=!0}},o[e]=function(){return u},t(o)}catch(t){}return r}},function(t,n,r){t.exports=r(69)||!r(4)(function(){var t=Math.random();__defineSetter__.call(null,t,function(){}),delete r(3)[t]})},function(t,n){n.f=Object.getOwnPropertySymbols},function(t,n,r){var e=r(3),i="__core-js_shared__",o=e[i]||(e[i]={});t.exports=function(t){return o[t]||(o[t]={})}},function(t,n,r){for(var e,i=r(3),o=r(27),u=r(76),c=u("typed_array"),f=u("view"),a=!(!i.ArrayBuffer||!i.DataView),s=a,l=0,h="Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array".split(",");l<9;)(e=i[h[l++]])?(o(e.prototype,c,!0),o(e.prototype,f,!0)):s=!1;t.exports={ABV:a,CONSTR:s,TYPED:c,VIEW:f}},function(t,n){"use strict";var r={versions:function(){var t=window.navigator.userAgent;return{trident:t.indexOf("Trident")>-1,presto:t.indexOf("Presto")>-1,webKit:t.indexOf("AppleWebKit")>-1,gecko:t.indexOf("Gecko")>-1&&-1==t.indexOf("KHTML"),mobile:!!t.match(/AppleWebKit.*Mobile.*/),ios:!!t.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/),android:t.indexOf("Android")>-1||t.indexOf("Linux")>-1,iPhone:t.indexOf("iPhone")>-1||t.indexOf("Mac")>-1,iPad:t.indexOf("iPad")>-1,webApp:-1==t.indexOf("Safari"),weixin:-1==t.indexOf("MicroMessenger")}}()};t.exports=r},function(t,n,r){"use strict";var e=r(85),i=function(t){return t&&t.__esModule?t:{default:t}}(e),o=function(){function t(t,n,e){return n||e?String.fromCharCode(n||e):r[t]||t}function n(t){return e[t]}var r={"&quot;":'"',"&lt;":"<","&gt;":">","&amp;":"&","&nbsp;":" "},e={};for(var u in r)e[r[u]]=u;return r["&apos;"]="'",e["'"]="&#39;",{encode:function(t){return t?(""+t).replace(/['<> "&]/g,n).replace(/\r?\n/g,"<br/>").replace(/\s/g,"&nbsp;"):""},decode:function(n){return n?(""+n).replace(/<br\s*\/?>/gi,"\n").replace(/&quot;|&lt;|&gt;|&amp;|&nbsp;|&apos;|&#(\d+);|&#(\d+)/g,t).replace(/\u00a0/g," "):""},encodeBase16:function(t){if(!t)return t;t+="";for(var n=[],r=0,e=t.length;e>r;r++)n.push(t.charCodeAt(r).toString(16).toUpperCase());return n.join("")},encodeBase16forJSON:function(t){if(!t)return t;t=t.replace(/[\u4E00-\u9FBF]/gi,function(t){return escape(t).replace("%u","\\u")});for(var n=[],r=0,e=t.length;e>r;r++)n.push(t.charCodeAt(r).toString(16).toUpperCase());return n.join("")},decodeBase16:function(t){if(!t)return t;t+="";for(var n=[],r=0,e=t.length;e>r;r+=2)n.push(String.fromCharCode("0x"+t.slice(r,r+2)));return n.join("")},encodeObject:function(t){if(t instanceof Array)for(var n=0,r=t.length;r>n;n++)t[n]=o.encodeObject(t[n]);else if("object"==(void 0===t?"undefined":(0,i.default)(t)))for(var e in t)t[e]=o.encodeObject(t[e]);else if("string"==typeof t)return o.encode(t);return t},loadScript:function(t){var n=document.createElement("script");document.getElementsByTagName("body")[0].appendChild(n),n.setAttribute("src",t)},addLoadEvent:function(t){var n=window.onload;"function"!=typeof window.onload?window.onload=t:window.onload=function(){n(),t()}}}}();t.exports=o},function(t,n,r){"use strict";var e=r(17),i=r(75),o=r(16);t.exports=function(t){for(var n=e(this),r=o(n.length),u=arguments.length,c=i(u>1?arguments[1]:void 0,r),f=u>2?arguments[2]:void 0,a=void 0===f?r:i(f,r);a>c;)n[c++]=t;return n}},function(t,n,r){"use strict";var e=r(11),i=r(66);t.exports=function(t,n,r){n in t?e.f(t,n,i(0,r)):t[n]=r}},function(t,n,r){var e=r(6),i=r(3).document,o=e(i)&&e(i.createElement);t.exports=function(t){return o?i.createElement(t):{}}},function(t,n){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(t,n,r){var e=r(7)("match");t.exports=function(t){var n=/./;try{"/./"[t](n)}catch(r){try{return n[e]=!1,!"/./"[t](n)}catch(t){}}return!0}},function(t,n,r){t.exports=r(3).document&&document.documentElement},function(t,n,r){var e=r(6),i=r(144).set;t.exports=function(t,n,r){var o,u=n.constructor;return u!==r&&"function"==typeof u&&(o=u.prototype)!==r.prototype&&e(o)&&i&&i(t,o),t}},function(t,n,r){var e=r(80),i=r(7)("iterator"),o=Array.prototype;t.exports=function(t){return void 0!==t&&(e.Array===t||o[i]===t)}},function(t,n,r){var e=r(45);t.exports=Array.isArray||function(t){return"Array"==e(t)}},function(t,n,r){"use strict";var e=r(70),i=r(66),o=r(81),u={};r(27)(u,r(7)("iterator"),function(){return this}),t.exports=function(t,n,r){t.prototype=e(u,{next:i(1,r)}),o(t,n+" Iterator")}},function(t,n,r){"use strict";var e=r(69),i=r(1),o=r(28),u=r(27),c=r(24),f=r(80),a=r(139),s=r(81),l=r(32),h=r(7)("iterator"),v=!([].keys&&"next"in[].keys()),p="keys",d="values",y=function(){return this};t.exports=function(t,n,r,g,b,m,x){a(r,n,g);var w,S,_,O=function(t){if(!v&&t in F)return F[t];switch(t){case p:case d:return function(){return new r(this,t)}}return function(){return new r(this,t)}},E=n+" Iterator",P=b==d,j=!1,F=t.prototype,M=F[h]||F["@@iterator"]||b&&F[b],A=M||O(b),N=b?P?O("entries"):A:void 0,T="Array"==n?F.entries||M:M;if(T&&(_=l(T.call(new t)))!==Object.prototype&&(s(_,E,!0),e||c(_,h)||u(_,h,y)),P&&M&&M.name!==d&&(j=!0,A=function(){return M.call(this)}),e&&!x||!v&&!j&&F[h]||u(F,h,A),f[n]=A,f[E]=y,b)if(w={values:P?A:O(d),keys:m?A:O(p),entries:N},x)for(S in w)S in F||o(F,S,w[S]);else i(i.P+i.F*(v||j),n,w);return w}},function(t,n){var r=Math.expm1;t.exports=!r||r(10)>22025.465794806718||r(10)<22025.465794806718||-2e-17!=r(-2e-17)?function(t){return 0==(t=+t)?t:t>-1e-6&&t<1e-6?t+t*t/2:Math.exp(t)-1}:r},function(t,n){t.exports=Math.sign||function(t){return 0==(t=+t)||t!=t?t:t<0?-1:1}},function(t,n,r){var e=r(3),i=r(151).set,o=e.MutationObserver||e.WebKitMutationObserver,u=e.process,c=e.Promise,f="process"==r(45)(u);t.exports=function(){var t,n,r,a=function(){var e,i;for(f&&(e=u.domain)&&e.exit();t;){i=t.fn,t=t.next;try{i()}catch(e){throw t?r():n=void 0,e}}n=void 0,e&&e.enter()};if(f)r=function(){u.nextTick(a)};else if(o){var s=!0,l=document.createTextNode("");new o(a).observe(l,{characterData:!0}),r=function(){l.data=s=!s}}else if(c&&c.resolve){var h=c.resolve();r=function(){h.then(a)}}else r=function(){i.call(e,a)};return function(e){var i={fn:e,next:void 0};n&&(n.next=i),t||(t=i,r()),n=i}}},function(t,n,r){var e=r(6),i=r(2),o=function(t,n){if(i(t),!e(n)&&null!==n)throw TypeError(n+": can't set as prototype!")};t.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(t,n,e){try{e=r(53)(Function.call,r(31).f(Object.prototype,"__proto__").set,2),e(t,[]),n=!(t instanceof Array)}catch(t){n=!0}return function(t,r){return o(t,r),n?t.__proto__=r:e(t,r),t}}({},!1):void 0),check:o}},function(t,n,r){var e=r(126)("keys"),i=r(76);t.exports=function(t){return e[t]||(e[t]=i(t))}},function(t,n,r){var e=r(2),i=r(26),o=r(7)("species");t.exports=function(t,n){var r,u=e(t).constructor;return void 0===u||void 0==(r=e(u)[o])?n:i(r)}},function(t,n,r){var e=r(67),i=r(46);t.exports=function(t){return function(n,r){var o,u,c=String(i(n)),f=e(r),a=c.length;return f<0||f>=a?t?"":void 0:(o=c.charCodeAt(f),o<55296||o>56319||f+1===a||(u=c.charCodeAt(f+1))<56320||u>57343?t?c.charAt(f):o:t?c.slice(f,f+2):u-56320+(o-55296<<10)+65536)}}},function(t,n,r){var e=r(122),i=r(46);t.exports=function(t,n,r){if(e(n))throw TypeError("String#"+r+" doesn't accept regex!");return String(i(t))}},function(t,n,r){"use strict";var e=r(67),i=r(46);t.exports=function(t){var n=String(i(this)),r="",o=e(t);if(o<0||o==1/0)throw RangeError("Count can't be negative");for(;o>0;(o>>>=1)&&(n+=n))1&o&&(r+=n);return r}},function(t,n){t.exports="\t\n\v\f\r   ᠎             　\u2028\u2029\ufeff"},function(t,n,r){var e,i,o,u=r(53),c=r(121),f=r(135),a=r(132),s=r(3),l=s.process,h=s.setImmediate,v=s.clearImmediate,p=s.MessageChannel,d=0,y={},g="onreadystatechange",b=function(){var t=+this;if(y.hasOwnProperty(t)){var n=y[t];delete y[t],n()}},m=function(t){b.call(t.data)};h&&v||(h=function(t){for(var n=[],r=1;arguments.length>r;)n.push(arguments[r++]);return y[++d]=function(){c("function"==typeof t?t:Function(t),n)},e(d),d},v=function(t){delete y[t]},"process"==r(45)(l)?e=function(t){l.nextTick(u(b,t,1))}:p?(i=new p,o=i.port2,i.port1.onmessage=m,e=u(o.postMessage,o,1)):s.addEventListener&&"function"==typeof postMessage&&!s.importScripts?(e=function(t){s.postMessage(t+"","*")},s.addEventListener("message",m,!1)):e=g in a("script")?function(t){f.appendChild(a("script"))[g]=function(){f.removeChild(this),b.call(t)}}:function(t){setTimeout(u(b,t,1),0)}),t.exports={set:h,clear:v}},function(t,n,r){"use strict";var e=r(3),i=r(10),o=r(69),u=r(127),c=r(27),f=r(73),a=r(4),s=r(68),l=r(67),h=r(16),v=r(71).f,p=r(11).f,d=r(130),y=r(81),g="ArrayBuffer",b="DataView",m="prototype",x="Wrong length!",w="Wrong index!",S=e[g],_=e[b],O=e.Math,E=e.RangeError,P=e.Infinity,j=S,F=O.abs,M=O.pow,A=O.floor,N=O.log,T=O.LN2,I="buffer",k="byteLength",L="byteOffset",R=i?"_b":I,C=i?"_l":k,D=i?"_o":L,U=function(t,n,r){var e,i,o,u=Array(r),c=8*r-n-1,f=(1<<c)-1,a=f>>1,s=23===n?M(2,-24)-M(2,-77):0,l=0,h=t<0||0===t&&1/t<0?1:0;for(t=F(t),t!=t||t===P?(i=t!=t?1:0,e=f):(e=A(N(t)/T),t*(o=M(2,-e))<1&&(e--,o*=2),t+=e+a>=1?s/o:s*M(2,1-a),t*o>=2&&(e++,o/=2),e+a>=f?(i=0,e=f):e+a>=1?(i=(t*o-1)*M(2,n),e+=a):(i=t*M(2,a-1)*M(2,n),e=0));n>=8;u[l++]=255&i,i/=256,n-=8);for(e=e<<n|i,c+=n;c>0;u[l++]=255&e,e/=256,c-=8);return u[--l]|=128*h,u},W=function(t,n,r){var e,i=8*r-n-1,o=(1<<i)-1,u=o>>1,c=i-7,f=r-1,a=t[f--],s=127&a;for(a>>=7;c>0;s=256*s+t[f],f--,c-=8);for(e=s&(1<<-c)-1,s>>=-c,c+=n;c>0;e=256*e+t[f],f--,c-=8);if(0===s)s=1-u;else{if(s===o)return e?NaN:a?-P:P;e+=M(2,n),s-=u}return(a?-1:1)*e*M(2,s-n)},G=function(t){return t[3]<<24|t[2]<<16|t[1]<<8|t[0]},B=function(t){return[255&t]},V=function(t){return[255&t,t>>8&255]},z=function(t){return[255&t,t>>8&255,t>>16&255,t>>24&255]},q=function(t){return U(t,52,8)},K=function(t){return U(t,23,4)},J=function(t,n,r){p(t[m],n,{get:function(){return this[r]}})},Y=function(t,n,r,e){var i=+r,o=l(i);if(i!=o||o<0||o+n>t[C])throw E(w);var u=t[R]._b,c=o+t[D],f=u.slice(c,c+n);return e?f:f.reverse()},H=function(t,n,r,e,i,o){var u=+r,c=l(u);if(u!=c||c<0||c+n>t[C])throw E(w);for(var f=t[R]._b,a=c+t[D],s=e(+i),h=0;h<n;h++)f[a+h]=s[o?h:n-h-1]},$=function(t,n){s(t,S,g);var r=+n,e=h(r);if(r!=e)throw E(x);return e};if(u.ABV){if(!a(function(){new S})||!a(function(){new S(.5)})){S=function(t){return new j($(this,t))};for(var X,Q=S[m]=j[m],Z=v(j),tt=0;Z.length>tt;)(X=Z[tt++])in S||c(S,X,j[X]);o||(Q.constructor=S)}var nt=new _(new S(2)),rt=_[m].setInt8;nt.setInt8(0,2147483648),nt.setInt8(1,2147483649),!nt.getInt8(0)&&nt.getInt8(1)||f(_[m],{setInt8:function(t,n){rt.call(this,t,n<<24>>24)},setUint8:function(t,n){rt.call(this,t,n<<24>>24)}},!0)}else S=function(t){var n=$(this,t);this._b=d.call(Array(n),0),this[C]=n},_=function(t,n,r){s(this,_,b),s(t,S,b);var e=t[C],i=l(n);if(i<0||i>e)throw E("Wrong offset!");if(r=void 0===r?e-i:h(r),i+r>e)throw E(x);this[R]=t,this[D]=i,this[C]=r},i&&(J(S,k,"_l"),J(_,I,"_b"),J(_,k,"_l"),J(_,L,"_o")),f(_[m],{getInt8:function(t){return Y(this,1,t)[0]<<24>>24},getUint8:function(t){return Y(this,1,t)[0]},getInt16:function(t){var n=Y(this,2,t,arguments[1]);return(n[1]<<8|n[0])<<16>>16},getUint16:function(t){var n=Y(this,2,t,arguments[1]);return n[1]<<8|n[0]},getInt32:function(t){return G(Y(this,4,t,arguments[1]))},getUint32:function(t){return G(Y(this,4,t,arguments[1]))>>>0},getFloat32:function(t){return W(Y(this,4,t,arguments[1]),23,4)},getFloat64:function(t){return W(Y(this,8,t,arguments[1]),52,8)},setInt8:function(t,n){H(this,1,t,B,n)},setUint8:function(t,n){H(this,1,t,B,n)},setInt16:function(t,n){H(this,2,t,V,n,arguments[2])},setUint16:function(t,n){H(this,2,t,V,n,arguments[2])},setInt32:function(t,n){H(this,4,t,z,n,arguments[2])},setUint32:function(t,n){H(this,4,t,z,n,arguments[2])},setFloat32:function(t,n){H(this,4,t,K,n,arguments[2])},setFloat64:function(t,n){H(this,8,t,q,n,arguments[2])}});y(S,g),y(_,b),c(_[m],u.VIEW,!0),n[g]=S,n[b]=_},function(t,n,r){var e=r(3),i=r(52),o=r(69),u=r(182),c=r(11).f;t.exports=function(t){var n=i.Symbol||(i.Symbol=o?{}:e.Symbol||{});"_"==t.charAt(0)||t in n||c(n,t,{value:u.f(t)})}},function(t,n,r){var e=r(114),i=r(7)("iterator"),o=r(80);t.exports=r(52).getIteratorMethod=function(t){if(void 0!=t)return t[i]||t["@@iterator"]||o[e(t)]}},function(t,n,r){"use strict";var e=r(78),i=r(170),o=r(80),u=r(30);t.exports=r(140)(Array,"Array",function(t,n){this._t=u(t),this._i=0,this._k=n},function(){var t=this._t,n=this._k,r=this._i++;return!t||r>=t.length?(this._t=void 0,i(1)):"keys"==n?i(0,r):"values"==n?i(0,t[r]):i(0,[r,t[r]])},"values"),o.Arguments=o.Array,e("keys"),e("values"),e("entries")},function(t,n){function r(t,n){t.classList?t.classList.add(n):t.className+=" "+n}t.exports=r},function(t,n){function r(t,n){if(t.classList)t.classList.remove(n);else{var r=new RegExp("(^|\\b)"+n.split(" ").join("|")+"(\\b|$)","gi");t.className=t.className.replace(r," ")}}t.exports=r},function(t,n){function r(){throw new Error("setTimeout has not been defined")}function e(){throw new Error("clearTimeout has not been defined")}function i(t){if(s===setTimeout)return setTimeout(t,0);if((s===r||!s)&&setTimeout)return s=setTimeout,setTimeout(t,0);try{return s(t,0)}catch(n){try{return s.call(null,t,0)}catch(n){return s.call(this,t,0)}}}function o(t){if(l===clearTimeout)return clearTimeout(t);if((l===e||!l)&&clearTimeout)return l=clearTimeout,clearTimeout(t);try{return l(t)}catch(n){try{return l.call(null,t)}catch(n){return l.call(this,t)}}}function u(){d&&v&&(d=!1,v.length?p=v.concat(p):y=-1,p.length&&c())}function c(){if(!d){var t=i(u);d=!0;for(var n=p.length;n;){for(v=p,p=[];++y<n;)v&&v[y].run();y=-1,n=p.length}v=null,d=!1,o(t)}}function f(t,n){this.fun=t,this.array=n}function a(){}var s,l,h=t.exports={};!function(){try{s="function"==typeof setTimeout?setTimeout:r}catch(t){s=r}try{l="function"==typeof clearTimeout?clearTimeout:e}catch(t){l=e}}();var v,p=[],d=!1,y=-1;h.nextTick=function(t){var n=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)n[r-1]=arguments[r];p.push(new f(t,n)),1!==p.length||d||i(c)},f.prototype.run=function(){this.fun.apply(null,this.array)},h.title="browser",h.browser=!0,h.env={},h.argv=[],h.version="",h.versions={},h.on=a,h.addListener=a,h.once=a,h.off=a,h.removeListener=a,h.removeAllListeners=a,h.emit=a,h.prependListener=a,h.prependOnceListener=a,h.listeners=function(t){return[]},h.binding=function(t){throw new Error("process.binding is not supported")},h.cwd=function(){return"/"},h.chdir=function(t){throw new Error("process.chdir is not supported")},h.umask=function(){return 0}},function(t,n,r){var e=r(45);t.exports=function(t,n){if("number"!=typeof t&&"Number"!=e(t))throw TypeError(n);return+t}},function(t,n,r){"use strict";var e=r(17),i=r(75),o=r(16);t.exports=[].copyWithin||function(t,n){var r=e(this),u=o(r.length),c=i(t,u),f=i(n,u),a=arguments.length>2?arguments[2]:void 0,s=Math.min((void 0===a?u:i(a,u))-f,u-c),l=1;for(f<c&&c<f+s&&(l=-1,f+=s-1,c+=s-1);s-- >0;)f in r?r[c]=r[f]:delete r[c],c+=l,f+=l;return r}},function(t,n,r){var e=r(79);t.exports=function(t,n){var r=[];return e(t,!1,r.push,r,n),r}},function(t,n,r){var e=r(26),i=r(17),o=r(115),u=r(16);t.exports=function(t,n,r,c,f){e(n);var a=i(t),s=o(a),l=u(a.length),h=f?l-1:0,v=f?-1:1;if(r<2)for(;;){if(h in s){c=s[h],h+=v;break}if(h+=v,f?h<0:l<=h)throw TypeError("Reduce of empty array with no initial value")}for(;f?h>=0:l>h;h+=v)h in s&&(c=n(c,s[h],h,a));return c}},function(t,n,r){"use strict";var e=r(26),i=r(6),o=r(121),u=[].slice,c={},f=function(t,n,r){if(!(n in c)){for(var e=[],i=0;i<n;i++)e[i]="a["+i+"]";c[n]=Function("F,a","return new F("+e.join(",")+")")}return c[n](t,r)};t.exports=Function.bind||function(t){var n=e(this),r=u.call(arguments,1),c=function(){var e=r.concat(u.call(arguments));return this instanceof c?f(n,e.length,e):o(n,e,t)};return i(n.prototype)&&(c.prototype=n.prototype),c}},function(t,n,r){"use strict";var e=r(11).f,i=r(70),o=r(73),u=r(53),c=r(68),f=r(46),a=r(79),s=r(140),l=r(170),h=r(74),v=r(10),p=r(65).fastKey,d=v?"_s":"size",y=function(t,n){var r,e=p(n);if("F"!==e)return t._i[e];for(r=t._f;r;r=r.n)if(r.k==n)return r};t.exports={getConstructor:function(t,n,r,s){var l=t(function(t,e){c(t,l,n,"_i"),t._i=i(null),t._f=void 0,t._l=void 0,t[d]=0,void 0!=e&&a(e,r,t[s],t)});return o(l.prototype,{clear:function(){for(var t=this,n=t._i,r=t._f;r;r=r.n)r.r=!0,r.p&&(r.p=r.p.n=void 0),delete n[r.i];t._f=t._l=void 0,t[d]=0},delete:function(t){var n=this,r=y(n,t);if(r){var e=r.n,i=r.p;delete n._i[r.i],r.r=!0,i&&(i.n=e),e&&(e.p=i),n._f==r&&(n._f=e),n._l==r&&(n._l=i),n[d]--}return!!r},forEach:function(t){c(this,l,"forEach");for(var n,r=u(t,arguments.length>1?arguments[1]:void 0,3);n=n?n.n:this._f;)for(r(n.v,n.k,this);n&&n.r;)n=n.p},has:function(t){return!!y(this,t)}}),v&&e(l.prototype,"size",{get:function(){return f(this[d])}}),l},def:function(t,n,r){var e,i,o=y(t,n);return o?o.v=r:(t._l=o={i:i=p(n,!0),k:n,v:r,p:e=t._l,n:void 0,r:!1},t._f||(t._f=o),e&&(e.n=o),t[d]++,"F"!==i&&(t._i[i]=o)),t},getEntry:y,setStrong:function(t,n,r){s(t,n,function(t,n){this._t=t,this._k=n,this._l=void 0},function(){for(var t=this,n=t._k,r=t._l;r&&r.r;)r=r.p;return t._t&&(t._l=r=r?r.n:t._t._f)?"keys"==n?l(0,r.k):"values"==n?l(0,r.v):l(0,[r.k,r.v]):(t._t=void 0,l(1))},r?"entries":"values",!r,!0),h(n)}}},function(t,n,r){var e=r(114),i=r(161);t.exports=function(t){return function(){if(e(this)!=t)throw TypeError(t+"#toJSON isn't generic");return i(this)}}},function(t,n,r){"use strict";var e=r(73),i=r(65).getWeak,o=r(2),u=r(6),c=r(68),f=r(79),a=r(48),s=r(24),l=a(5),h=a(6),v=0,p=function(t){return t._l||(t._l=new d)},d=function(){this.a=[]},y=function(t,n){return l(t.a,function(t){return t[0]===n})};d.prototype={get:function(t){var n=y(this,t);if(n)return n[1]},has:function(t){return!!y(this,t)},set:function(t,n){var r=y(this,t);r?r[1]=n:this.a.push([t,n])},delete:function(t){var n=h(this.a,function(n){return n[0]===t});return~n&&this.a.splice(n,1),!!~n}},t.exports={getConstructor:function(t,n,r,o){var a=t(function(t,e){c(t,a,n,"_i"),t._i=v++,t._l=void 0,void 0!=e&&f(e,r,t[o],t)});return e(a.prototype,{delete:function(t){if(!u(t))return!1;var n=i(t);return!0===n?p(this).delete(t):n&&s(n,this._i)&&delete n[this._i]},has:function(t){if(!u(t))return!1;var n=i(t);return!0===n?p(this).has(t):n&&s(n,this._i)}}),a},def:function(t,n,r){var e=i(o(n),!0);return!0===e?p(t).set(n,r):e[t._i]=r,t},ufstore:p}},function(t,n,r){t.exports=!r(10)&&!r(4)(function(){return 7!=Object.defineProperty(r(132)("div"),"a",{get:function(){return 7}}).a})},function(t,n,r){var e=r(6),i=Math.floor;t.exports=function(t){return!e(t)&&isFinite(t)&&i(t)===t}},function(t,n,r){var e=r(2);t.exports=function(t,n,r,i){try{return i?n(e(r)[0],r[1]):n(r)}catch(n){var o=t.return;throw void 0!==o&&e(o.call(t)),n}}},function(t,n){t.exports=function(t,n){return{value:n,done:!!t}}},function(t,n){t.exports=Math.log1p||function(t){return(t=+t)>-1e-8&&t<1e-8?t-t*t/2:Math.log(1+t)}},function(t,n,r){"use strict";var e=r(72),i=r(125),o=r(116),u=r(17),c=r(115),f=Object.assign;t.exports=!f||r(4)(function(){var t={},n={},r=Symbol(),e="abcdefghijklmnopqrst";return t[r]=7,e.split("").forEach(function(t){n[t]=t}),7!=f({},t)[r]||Object.keys(f({},n)).join("")!=e})?function(t,n){for(var r=u(t),f=arguments.length,a=1,s=i.f,l=o.f;f>a;)for(var h,v=c(arguments[a++]),p=s?e(v).concat(s(v)):e(v),d=p.length,y=0;d>y;)l.call(v,h=p[y++])&&(r[h]=v[h]);return r}:f},function(t,n,r){var e=r(11),i=r(2),o=r(72);t.exports=r(10)?Object.defineProperties:function(t,n){i(t);for(var r,u=o(n),c=u.length,f=0;c>f;)e.f(t,r=u[f++],n[r]);return t}},function(t,n,r){var e=r(30),i=r(71).f,o={}.toString,u="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],c=function(t){try{return i(t)}catch(t){return u.slice()}};t.exports.f=function(t){return u&&"[object Window]"==o.call(t)?c(t):i(e(t))}},function(t,n,r){var e=r(24),i=r(30),o=r(117)(!1),u=r(145)("IE_PROTO");t.exports=function(t,n){var r,c=i(t),f=0,a=[];for(r in c)r!=u&&e(c,r)&&a.push(r);for(;n.length>f;)e(c,r=n[f++])&&(~o(a,r)||a.push(r));return a}},function(t,n,r){var e=r(72),i=r(30),o=r(116).f;t.exports=function(t){return function(n){for(var r,u=i(n),c=e(u),f=c.length,a=0,s=[];f>a;)o.call(u,r=c[a++])&&s.push(t?[r,u[r]]:u[r]);return s}}},function(t,n,r){var e=r(71),i=r(125),o=r(2),u=r(3).Reflect;t.exports=u&&u.ownKeys||function(t){var n=e.f(o(t)),r=i.f;return r?n.concat(r(t)):n}},function(t,n,r){var e=r(3).parseFloat,i=r(82).trim;t.exports=1/e(r(150)+"-0")!=-1/0?function(t){var n=i(String(t),3),r=e(n);return 0===r&&"-"==n.charAt(0)?-0:r}:e},function(t,n,r){var e=r(3).parseInt,i=r(82).trim,o=r(150),u=/^[\-+]?0[xX]/;t.exports=8!==e(o+"08")||22!==e(o+"0x16")?function(t,n){var r=i(String(t),3);return e(r,n>>>0||(u.test(r)?16:10))}:e},function(t,n){t.exports=Object.is||function(t,n){return t===n?0!==t||1/t==1/n:t!=t&&n!=n}},function(t,n,r){var e=r(16),i=r(149),o=r(46);t.exports=function(t,n,r,u){var c=String(o(t)),f=c.length,a=void 0===r?" ":String(r),s=e(n);if(s<=f||""==a)return c;var l=s-f,h=i.call(a,Math.ceil(l/a.length));return h.length>l&&(h=h.slice(0,l)),u?h+c:c+h}},function(t,n,r){n.f=r(7)},function(t,n,r){"use strict";var e=r(164);t.exports=r(118)("Map",function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}},{get:function(t){var n=e.getEntry(this,t);return n&&n.v},set:function(t,n){return e.def(this,0===t?0:t,n)}},e,!0)},function(t,n,r){r(10)&&"g"!=/./g.flags&&r(11).f(RegExp.prototype,"flags",{configurable:!0,get:r(120)})},function(t,n,r){"use strict";var e=r(164);t.exports=r(118)("Set",function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}},{add:function(t){return e.def(this,t=0===t?0:t,t)}},e)},function(t,n,r){"use strict";var e,i=r(48)(0),o=r(28),u=r(65),c=r(172),f=r(166),a=r(6),s=u.getWeak,l=Object.isExtensible,h=f.ufstore,v={},p=function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}},d={get:function(t){if(a(t)){var n=s(t);return!0===n?h(this).get(t):n?n[this._i]:void 0}},set:function(t,n){return f.def(this,t,n)}},y=t.exports=r(118)("WeakMap",p,d,f,!0,!0);7!=(new y).set((Object.freeze||Object)(v),7).get(v)&&(e=f.getConstructor(p),c(e.prototype,d),u.NEED=!0,i(["delete","has","get","set"],function(t){var n=y.prototype,r=n[t];o(n,t,function(n,i){if(a(n)&&!l(n)){this._f||(this._f=new e);var o=this._f[t](n,i);return"set"==t?this:o}return r.call(this,n,i)})}))},,,,function(t,n){"use strict";function r(){var t=document.querySelector("#page-nav");if(t&&!document.querySelector("#page-nav .extend.prev")&&(t.innerHTML='<a class="extend prev disabled" rel="prev">上一页:Prev</a>'+t.innerHTML),t&&!document.querySelector("#page-nav .extend.next")&&(t.innerHTML=t.innerHTML+'<a class="extend next disabled" rel="next">下一页:Next</a>'),yiliaConfig&&yiliaConfig.open_in_new){document.querySelectorAll(".article-entry a:not(.article-more-a)").forEach(function(t){var n=t.getAttribute("target");n&&""!==n||t.setAttribute("target","_blank")})}if(yiliaConfig&&yiliaConfig.toc_hide_index){document.querySelectorAll(".toc-number").forEach(function(t){t.style.display="none"})}var n=document.querySelector("#js-aboutme");n&&0!==n.length&&(n.innerHTML=n.innerText)}t.exports={init:r}},function(t,n,r){"use strict";function e(t){return t&&t.__esModule?t:{default:t}}function i(t,n){var r=/\/|index.html/g;return t.replace(r,"")===n.replace(r,"")}function o(){for(var t=document.querySelectorAll(".js-header-menu li a"),n=window.location.pathname,r=0,e=t.length;r<e;r++){var o=t[r];i(n,o.getAttribute("href"))&&(0,h.default)(o,"active")}}function u(t){for(var n=t.offsetLeft,r=t.offsetParent;null!==r;)n+=r.offsetLeft,r=r.offsetParent;return n}function c(t){for(var n=t.offsetTop,r=t.offsetParent;null!==r;)n+=r.offsetTop,r=r.offsetParent;return n}function f(t,n,r,e,i){var o=u(t),f=c(t)-n;if(f-r<=i){var a=t.$newDom;a||(a=t.cloneNode(!0),(0,d.default)(t,a),t.$newDom=a,a.style.position="fixed",a.style.top=(r||f)+"px",a.style.left=o+"px",a.style.zIndex=e||2,a.style.width="100%",a.style.color="#fff"),a.style.visibility="visible",t.style.visibility="hidden"}else{t.style.visibility="visible";var s=t.$newDom;s&&(s.style.visibility="hidden")}}function a(){var t=document.querySelector(".js-overlay"),n=document.querySelector(".js-header-menu");f(t,document.body.scrollTop,-63,2,0),f(n,document.body.scrollTop,1,3,0)}function s(){document.querySelector("#container").addEventListener("scroll",function(t){a()}),window.addEventListener("scroll",function(t){a()}),a()}var l=r(156),h=e(l),v=r(157),p=(e(v),r(382)),d=e(p),y=r(128),g=e(y),b=r(190),m=e(b),x=r(129);(function(){g.default.versions.mobile&&window.screen.width<800&&(o(),s())})(),(0,x.addLoadEvent)(function(){m.default.init()}),t.exports={}},,,,function(t,n,r){(function(t){"use strict";function n(t,n,r){t[n]||Object[e](t,n,{writable:!0,configurable:!0,value:r})}if(r(381),r(391),r(198),t._babelPolyfill)throw new Error("only one instance of babel-polyfill is allowed");t._babelPolyfill=!0;var e="defineProperty";n(String.prototype,"padLeft","".padStart),n(String.prototype,"padRight","".padEnd),"pop,reverse,shift,keys,values,entries,indexOf,every,some,forEach,map,filter,find,findIndex,includes,join,slice,concat,push,splice,unshift,sort,lastIndexOf,reduce,reduceRight,copyWithin,fill".split(",").forEach(function(t){[][t]&&n(Array,t,Function.call.bind([][t]))})}).call(n,function(){return this}())},,,function(t,n,r){r(210),t.exports=r(52).RegExp.escape},,,,function(t,n,r){var e=r(6),i=r(138),o=r(7)("species");t.exports=function(t){var n;return i(t)&&(n=t.constructor,"function"!=typeof n||n!==Array&&!i(n.prototype)||(n=void 0),e(n)&&null===(n=n[o])&&(n=void 0)),void 0===n?Array:n}},function(t,n,r){var e=r(202);t.exports=function(t,n){return new(e(t))(n)}},function(t,n,r){"use strict";var e=r(2),i=r(50),o="number";t.exports=function(t){if("string"!==t&&t!==o&&"default"!==t)throw TypeError("Incorrect hint");return i(e(this),t!=o)}},function(t,n,r){var e=r(72),i=r(125),o=r(116);t.exports=function(t){var n=e(t),r=i.f;if(r)for(var u,c=r(t),f=o.f,a=0;c.length>a;)f.call(t,u=c[a++])&&n.push(u);return n}},function(t,n,r){var e=r(72),i=r(30);t.exports=function(t,n){for(var r,o=i(t),u=e(o),c=u.length,f=0;c>f;)if(o[r=u[f++]]===n)return r}},function(t,n,r){"use strict";var e=r(208),i=r(121),o=r(26);t.exports=function(){for(var t=o(this),n=arguments.length,r=Array(n),u=0,c=e._,f=!1;n>u;)(r[u]=arguments[u++])===c&&(f=!0);return function(){var e,o=this,u=arguments.length,a=0,s=0;if(!f&&!u)return i(t,r,o);if(e=r.slice(),f)for(;n>a;a++)e[a]===c&&(e[a]=arguments[s++]);for(;u>s;)e.push(arguments[s++]);return i(t,e,o)}}},function(t,n,r){t.exports=r(3)},function(t,n){t.exports=function(t,n){var r=n===Object(n)?function(t){return n[t]}:n;return function(n){return String(n).replace(t,r)}}},function(t,n,r){var e=r(1),i=r(209)(/[\\^$*+?.()|[\]{}]/g,"\\$&");e(e.S,"RegExp",{escape:function(t){return i(t)}})},function(t,n,r){var e=r(1);e(e.P,"Array",{copyWithin:r(160)}),r(78)("copyWithin")},function(t,n,r){"use strict";var e=r(1),i=r(48)(4);e(e.P+e.F*!r(47)([].every,!0),"Array",{every:function(t){return i(this,t,arguments[1])}})},function(t,n,r){var e=r(1);e(e.P,"Array",{fill:r(130)}),r(78)("fill")},function(t,n,r){"use strict";var e=r(1),i=r(48)(2);e(e.P+e.F*!r(47)([].filter,!0),"Array",{filter:function(t){return i(this,t,arguments[1])}})},function(t,n,r){"use strict";var e=r(1),i=r(48)(6),o="findIndex",u=!0;o in[]&&Array(1)[o](function(){u=!1}),e(e.P+e.F*u,"Array",{findIndex:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}}),r(78)(o)},function(t,n,r){"use strict";var e=r(1),i=r(48)(5),o="find",u=!0;o in[]&&Array(1)[o](function(){u=!1}),e(e.P+e.F*u,"Array",{find:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}}),r(78)(o)},function(t,n,r){"use strict";var e=r(1),i=r(48)(0),o=r(47)([].forEach,!0);e(e.P+e.F*!o,"Array",{forEach:function(t){return i(this,t,arguments[1])}})},function(t,n,r){"use strict";var e=r(53),i=r(1),o=r(17),u=r(169),c=r(137),f=r(16),a=r(131),s=r(154);i(i.S+i.F*!r(123)(function(t){Array.from(t)}),"Array",{from:function(t){var n,r,i,l,h=o(t),v="function"==typeof this?this:Array,p=arguments.length,d=p>1?arguments[1]:void 0,y=void 0!==d,g=0,b=s(h);if(y&&(d=e(d,p>2?arguments[2]:void 0,2)),void 0==b||v==Array&&c(b))for(n=f(h.length),r=new v(n);n>g;g++)a(r,g,y?d(h[g],g):h[g]);else for(l=b.call(h),r=new v;!(i=l.next()).done;g++)a(r,g,y?u(l,d,[i.value,g],!0):i.value);return r.length=g,r}})},function(t,n,r){"use strict";var e=r(1),i=r(117)(!1),o=[].indexOf,u=!!o&&1/[1].indexOf(1,-0)<0;e(e.P+e.F*(u||!r(47)(o)),"Array",{indexOf:function(t){return u?o.apply(this,arguments)||0:i(this,t,arguments[1])}})},function(t,n,r){var e=r(1);e(e.S,"Array",{isArray:r(138)})},function(t,n,r){"use strict";var e=r(1),i=r(30),o=[].join;e(e.P+e.F*(r(115)!=Object||!r(47)(o)),"Array",{join:function(t){return o.call(i(this),void 0===t?",":t)}})},function(t,n,r){"use strict";var e=r(1),i=r(30),o=r(67),u=r(16),c=[].lastIndexOf,f=!!c&&1/[1].lastIndexOf(1,-0)<0;e(e.P+e.F*(f||!r(47)(c)),"Array",{lastIndexOf:function(t){if(f)return c.apply(this,arguments)||0;var n=i(this),r=u(n.length),e=r-1;for(arguments.length>1&&(e=Math.min(e,o(arguments[1]))),e<0&&(e=r+e);e>=0;e--)if(e in n&&n[e]===t)return e||0;return-1}})},function(t,n,r){"use strict";var e=r(1),i=r(48)(1);e(e.P+e.F*!r(47)([].map,!0),"Array",{map:function(t){return i(this,t,arguments[1])}})},function(t,n,r){"use strict";var e=r(1),i=r(131);e(e.S+e.F*r(4)(function(){function t(){}return!(Array.of.call(t)instanceof t)}),"Array",{of:function(){for(var t=0,n=arguments.length,r=new("function"==typeof this?this:Array)(n);n>t;)i(r,t,arguments[t++]);return r.length=n,r}})},function(t,n,r){"use strict";var e=r(1),i=r(162);e(e.P+e.F*!r(47)([].reduceRight,!0),"Array",{reduceRight:function(t){return i(this,t,arguments.length,arguments[1],!0)}})},function(t,n,r){"use strict";var e=r(1),i=r(162);e(e.P+e.F*!r(47)([].reduce,!0),"Array",{reduce:function(t){return i(this,t,arguments.length,arguments[1],!1)}})},function(t,n,r){"use strict";var e=r(1),i=r(135),o=r(45),u=r(75),c=r(16),f=[].slice;e(e.P+e.F*r(4)(function(){i&&f.call(i)}),"Array",{slice:function(t,n){var r=c(this.length),e=o(this);if(n=void 0===n?r:n,"Array"==e)return f.call(this,t,n);for(var i=u(t,r),a=u(n,r),s=c(a-i),l=Array(s),h=0;h<s;h++)l[h]="String"==e?this.charAt(i+h):this[i+h];return l}})},function(t,n,r){"use strict";var e=r(1),i=r(48)(3);e(e.P+e.F*!r(47)([].some,!0),"Array",{some:function(t){return i(this,t,arguments[1])}})},function(t,n,r){"use strict";var e=r(1),i=r(26),o=r(17),u=r(4),c=[].sort,f=[1,2,3];e(e.P+e.F*(u(function(){f.sort(void 0)})||!u(function(){f.sort(null)})||!r(47)(c)),"Array",{sort:function(t){return void 0===t?c.call(o(this)):c.call(o(this),i(t))}})},function(t,n,r){r(74)("Array")},function(t,n,r){var e=r(1);e(e.S,"Date",{now:function(){return(new Date).getTime()}})},function(t,n,r){"use strict";var e=r(1),i=r(4),o=Date.prototype.getTime,u=function(t){return t>9?t:"0"+t};e(e.P+e.F*(i(function(){return"0385-07-25T07:06:39.999Z"!=new Date(-5e13-1).toISOString()})||!i(function(){new Date(NaN).toISOString()})),"Date",{toISOString:function(){
if(!isFinite(o.call(this)))throw RangeError("Invalid time value");var t=this,n=t.getUTCFullYear(),r=t.getUTCMilliseconds(),e=n<0?"-":n>9999?"+":"";return e+("00000"+Math.abs(n)).slice(e?-6:-4)+"-"+u(t.getUTCMonth()+1)+"-"+u(t.getUTCDate())+"T"+u(t.getUTCHours())+":"+u(t.getUTCMinutes())+":"+u(t.getUTCSeconds())+"."+(r>99?r:"0"+u(r))+"Z"}})},function(t,n,r){"use strict";var e=r(1),i=r(17),o=r(50);e(e.P+e.F*r(4)(function(){return null!==new Date(NaN).toJSON()||1!==Date.prototype.toJSON.call({toISOString:function(){return 1}})}),"Date",{toJSON:function(t){var n=i(this),r=o(n);return"number"!=typeof r||isFinite(r)?n.toISOString():null}})},function(t,n,r){var e=r(7)("toPrimitive"),i=Date.prototype;e in i||r(27)(i,e,r(204))},function(t,n,r){var e=Date.prototype,i="Invalid Date",o="toString",u=e[o],c=e.getTime;new Date(NaN)+""!=i&&r(28)(e,o,function(){var t=c.call(this);return t===t?u.call(this):i})},function(t,n,r){var e=r(1);e(e.P,"Function",{bind:r(163)})},function(t,n,r){"use strict";var e=r(6),i=r(32),o=r(7)("hasInstance"),u=Function.prototype;o in u||r(11).f(u,o,{value:function(t){if("function"!=typeof this||!e(t))return!1;if(!e(this.prototype))return t instanceof this;for(;t=i(t);)if(this.prototype===t)return!0;return!1}})},function(t,n,r){var e=r(11).f,i=r(66),o=r(24),u=Function.prototype,c="name",f=Object.isExtensible||function(){return!0};c in u||r(10)&&e(u,c,{configurable:!0,get:function(){try{var t=this,n=(""+t).match(/^\s*function ([^ (]*)/)[1];return o(t,c)||!f(t)||e(t,c,i(5,n)),n}catch(t){return""}}})},function(t,n,r){var e=r(1),i=r(171),o=Math.sqrt,u=Math.acosh;e(e.S+e.F*!(u&&710==Math.floor(u(Number.MAX_VALUE))&&u(1/0)==1/0),"Math",{acosh:function(t){return(t=+t)<1?NaN:t>94906265.62425156?Math.log(t)+Math.LN2:i(t-1+o(t-1)*o(t+1))}})},function(t,n,r){function e(t){return isFinite(t=+t)&&0!=t?t<0?-e(-t):Math.log(t+Math.sqrt(t*t+1)):t}var i=r(1),o=Math.asinh;i(i.S+i.F*!(o&&1/o(0)>0),"Math",{asinh:e})},function(t,n,r){var e=r(1),i=Math.atanh;e(e.S+e.F*!(i&&1/i(-0)<0),"Math",{atanh:function(t){return 0==(t=+t)?t:Math.log((1+t)/(1-t))/2}})},function(t,n,r){var e=r(1),i=r(142);e(e.S,"Math",{cbrt:function(t){return i(t=+t)*Math.pow(Math.abs(t),1/3)}})},function(t,n,r){var e=r(1);e(e.S,"Math",{clz32:function(t){return(t>>>=0)?31-Math.floor(Math.log(t+.5)*Math.LOG2E):32}})},function(t,n,r){var e=r(1),i=Math.exp;e(e.S,"Math",{cosh:function(t){return(i(t=+t)+i(-t))/2}})},function(t,n,r){var e=r(1),i=r(141);e(e.S+e.F*(i!=Math.expm1),"Math",{expm1:i})},function(t,n,r){var e=r(1),i=r(142),o=Math.pow,u=o(2,-52),c=o(2,-23),f=o(2,127)*(2-c),a=o(2,-126),s=function(t){return t+1/u-1/u};e(e.S,"Math",{fround:function(t){var n,r,e=Math.abs(t),o=i(t);return e<a?o*s(e/a/c)*a*c:(n=(1+c/u)*e,r=n-(n-e),r>f||r!=r?o*(1/0):o*r)}})},function(t,n,r){var e=r(1),i=Math.abs;e(e.S,"Math",{hypot:function(t,n){for(var r,e,o=0,u=0,c=arguments.length,f=0;u<c;)r=i(arguments[u++]),f<r?(e=f/r,o=o*e*e+1,f=r):r>0?(e=r/f,o+=e*e):o+=r;return f===1/0?1/0:f*Math.sqrt(o)}})},function(t,n,r){var e=r(1),i=Math.imul;e(e.S+e.F*r(4)(function(){return-5!=i(4294967295,5)||2!=i.length}),"Math",{imul:function(t,n){var r=65535,e=+t,i=+n,o=r&e,u=r&i;return 0|o*u+((r&e>>>16)*u+o*(r&i>>>16)<<16>>>0)}})},function(t,n,r){var e=r(1);e(e.S,"Math",{log10:function(t){return Math.log(t)/Math.LN10}})},function(t,n,r){var e=r(1);e(e.S,"Math",{log1p:r(171)})},function(t,n,r){var e=r(1);e(e.S,"Math",{log2:function(t){return Math.log(t)/Math.LN2}})},function(t,n,r){var e=r(1);e(e.S,"Math",{sign:r(142)})},function(t,n,r){var e=r(1),i=r(141),o=Math.exp;e(e.S+e.F*r(4)(function(){return-2e-17!=!Math.sinh(-2e-17)}),"Math",{sinh:function(t){return Math.abs(t=+t)<1?(i(t)-i(-t))/2:(o(t-1)-o(-t-1))*(Math.E/2)}})},function(t,n,r){var e=r(1),i=r(141),o=Math.exp;e(e.S,"Math",{tanh:function(t){var n=i(t=+t),r=i(-t);return n==1/0?1:r==1/0?-1:(n-r)/(o(t)+o(-t))}})},function(t,n,r){var e=r(1);e(e.S,"Math",{trunc:function(t){return(t>0?Math.floor:Math.ceil)(t)}})},function(t,n,r){"use strict";var e=r(3),i=r(24),o=r(45),u=r(136),c=r(50),f=r(4),a=r(71).f,s=r(31).f,l=r(11).f,h=r(82).trim,v="Number",p=e[v],d=p,y=p.prototype,g=o(r(70)(y))==v,b="trim"in String.prototype,m=function(t){var n=c(t,!1);if("string"==typeof n&&n.length>2){n=b?n.trim():h(n,3);var r,e,i,o=n.charCodeAt(0);if(43===o||45===o){if(88===(r=n.charCodeAt(2))||120===r)return NaN}else if(48===o){switch(n.charCodeAt(1)){case 66:case 98:e=2,i=49;break;case 79:case 111:e=8,i=55;break;default:return+n}for(var u,f=n.slice(2),a=0,s=f.length;a<s;a++)if((u=f.charCodeAt(a))<48||u>i)return NaN;return parseInt(f,e)}}return+n};if(!p(" 0o1")||!p("0b1")||p("+0x1")){p=function(t){var n=arguments.length<1?0:t,r=this;return r instanceof p&&(g?f(function(){y.valueOf.call(r)}):o(r)!=v)?u(new d(m(n)),r,p):m(n)};for(var x,w=r(10)?a(d):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","),S=0;w.length>S;S++)i(d,x=w[S])&&!i(p,x)&&l(p,x,s(d,x));p.prototype=y,y.constructor=p,r(28)(e,v,p)}},function(t,n,r){var e=r(1);e(e.S,"Number",{EPSILON:Math.pow(2,-52)})},function(t,n,r){var e=r(1),i=r(3).isFinite;e(e.S,"Number",{isFinite:function(t){return"number"==typeof t&&i(t)}})},function(t,n,r){var e=r(1);e(e.S,"Number",{isInteger:r(168)})},function(t,n,r){var e=r(1);e(e.S,"Number",{isNaN:function(t){return t!=t}})},function(t,n,r){var e=r(1),i=r(168),o=Math.abs;e(e.S,"Number",{isSafeInteger:function(t){return i(t)&&o(t)<=9007199254740991}})},function(t,n,r){var e=r(1);e(e.S,"Number",{MAX_SAFE_INTEGER:9007199254740991})},function(t,n,r){var e=r(1);e(e.S,"Number",{MIN_SAFE_INTEGER:-9007199254740991})},function(t,n,r){var e=r(1),i=r(178);e(e.S+e.F*(Number.parseFloat!=i),"Number",{parseFloat:i})},function(t,n,r){var e=r(1),i=r(179);e(e.S+e.F*(Number.parseInt!=i),"Number",{parseInt:i})},function(t,n,r){"use strict";var e=r(1),i=r(67),o=r(159),u=r(149),c=1..toFixed,f=Math.floor,a=[0,0,0,0,0,0],s="Number.toFixed: incorrect invocation!",l="0",h=function(t,n){for(var r=-1,e=n;++r<6;)e+=t*a[r],a[r]=e%1e7,e=f(e/1e7)},v=function(t){for(var n=6,r=0;--n>=0;)r+=a[n],a[n]=f(r/t),r=r%t*1e7},p=function(){for(var t=6,n="";--t>=0;)if(""!==n||0===t||0!==a[t]){var r=String(a[t]);n=""===n?r:n+u.call(l,7-r.length)+r}return n},d=function(t,n,r){return 0===n?r:n%2==1?d(t,n-1,r*t):d(t*t,n/2,r)},y=function(t){for(var n=0,r=t;r>=4096;)n+=12,r/=4096;for(;r>=2;)n+=1,r/=2;return n};e(e.P+e.F*(!!c&&("0.000"!==8e-5.toFixed(3)||"1"!==.9.toFixed(0)||"1.25"!==1.255.toFixed(2)||"1000000000000000128"!==(0xde0b6b3a7640080).toFixed(0))||!r(4)(function(){c.call({})})),"Number",{toFixed:function(t){var n,r,e,c,f=o(this,s),a=i(t),g="",b=l;if(a<0||a>20)throw RangeError(s);if(f!=f)return"NaN";if(f<=-1e21||f>=1e21)return String(f);if(f<0&&(g="-",f=-f),f>1e-21)if(n=y(f*d(2,69,1))-69,r=n<0?f*d(2,-n,1):f/d(2,n,1),r*=4503599627370496,(n=52-n)>0){for(h(0,r),e=a;e>=7;)h(1e7,0),e-=7;for(h(d(10,e,1),0),e=n-1;e>=23;)v(1<<23),e-=23;v(1<<e),h(1,1),v(2),b=p()}else h(0,r),h(1<<-n,0),b=p()+u.call(l,a);return a>0?(c=b.length,b=g+(c<=a?"0."+u.call(l,a-c)+b:b.slice(0,c-a)+"."+b.slice(c-a))):b=g+b,b}})},function(t,n,r){"use strict";var e=r(1),i=r(4),o=r(159),u=1..toPrecision;e(e.P+e.F*(i(function(){return"1"!==u.call(1,void 0)})||!i(function(){u.call({})})),"Number",{toPrecision:function(t){var n=o(this,"Number#toPrecision: incorrect invocation!");return void 0===t?u.call(n):u.call(n,t)}})},function(t,n,r){var e=r(1);e(e.S+e.F,"Object",{assign:r(172)})},function(t,n,r){var e=r(1);e(e.S,"Object",{create:r(70)})},function(t,n,r){var e=r(1);e(e.S+e.F*!r(10),"Object",{defineProperties:r(173)})},function(t,n,r){var e=r(1);e(e.S+e.F*!r(10),"Object",{defineProperty:r(11).f})},function(t,n,r){var e=r(6),i=r(65).onFreeze;r(49)("freeze",function(t){return function(n){return t&&e(n)?t(i(n)):n}})},function(t,n,r){var e=r(30),i=r(31).f;r(49)("getOwnPropertyDescriptor",function(){return function(t,n){return i(e(t),n)}})},function(t,n,r){r(49)("getOwnPropertyNames",function(){return r(174).f})},function(t,n,r){var e=r(17),i=r(32);r(49)("getPrototypeOf",function(){return function(t){return i(e(t))}})},function(t,n,r){var e=r(6);r(49)("isExtensible",function(t){return function(n){return!!e(n)&&(!t||t(n))}})},function(t,n,r){var e=r(6);r(49)("isFrozen",function(t){return function(n){return!e(n)||!!t&&t(n)}})},function(t,n,r){var e=r(6);r(49)("isSealed",function(t){return function(n){return!e(n)||!!t&&t(n)}})},function(t,n,r){var e=r(1);e(e.S,"Object",{is:r(180)})},function(t,n,r){var e=r(17),i=r(72);r(49)("keys",function(){return function(t){return i(e(t))}})},function(t,n,r){var e=r(6),i=r(65).onFreeze;r(49)("preventExtensions",function(t){return function(n){return t&&e(n)?t(i(n)):n}})},function(t,n,r){var e=r(6),i=r(65).onFreeze;r(49)("seal",function(t){return function(n){return t&&e(n)?t(i(n)):n}})},function(t,n,r){var e=r(1);e(e.S,"Object",{setPrototypeOf:r(144).set})},function(t,n,r){"use strict";var e=r(114),i={};i[r(7)("toStringTag")]="z",i+""!="[object z]"&&r(28)(Object.prototype,"toString",function(){return"[object "+e(this)+"]"},!0)},function(t,n,r){var e=r(1),i=r(178);e(e.G+e.F*(parseFloat!=i),{parseFloat:i})},function(t,n,r){var e=r(1),i=r(179);e(e.G+e.F*(parseInt!=i),{parseInt:i})},function(t,n,r){"use strict";var e,i,o,u=r(69),c=r(3),f=r(53),a=r(114),s=r(1),l=r(6),h=r(26),v=r(68),p=r(79),d=r(146),y=r(151).set,g=r(143)(),b="Promise",m=c.TypeError,x=c.process,w=c[b],x=c.process,S="process"==a(x),_=function(){},O=!!function(){try{var t=w.resolve(1),n=(t.constructor={})[r(7)("species")]=function(t){t(_,_)};return(S||"function"==typeof PromiseRejectionEvent)&&t.then(_)instanceof n}catch(t){}}(),E=function(t,n){return t===n||t===w&&n===o},P=function(t){var n;return!(!l(t)||"function"!=typeof(n=t.then))&&n},j=function(t){return E(w,t)?new F(t):new i(t)},F=i=function(t){var n,r;this.promise=new t(function(t,e){if(void 0!==n||void 0!==r)throw m("Bad Promise constructor");n=t,r=e}),this.resolve=h(n),this.reject=h(r)},M=function(t){try{t()}catch(t){return{error:t}}},A=function(t,n){if(!t._n){t._n=!0;var r=t._c;g(function(){for(var e=t._v,i=1==t._s,o=0;r.length>o;)!function(n){var r,o,u=i?n.ok:n.fail,c=n.resolve,f=n.reject,a=n.domain;try{u?(i||(2==t._h&&I(t),t._h=1),!0===u?r=e:(a&&a.enter(),r=u(e),a&&a.exit()),r===n.promise?f(m("Promise-chain cycle")):(o=P(r))?o.call(r,c,f):c(r)):f(e)}catch(t){f(t)}}(r[o++]);t._c=[],t._n=!1,n&&!t._h&&N(t)})}},N=function(t){y.call(c,function(){var n,r,e,i=t._v;if(T(t)&&(n=M(function(){S?x.emit("unhandledRejection",i,t):(r=c.onunhandledrejection)?r({promise:t,reason:i}):(e=c.console)&&e.error&&e.error("Unhandled promise rejection",i)}),t._h=S||T(t)?2:1),t._a=void 0,n)throw n.error})},T=function(t){if(1==t._h)return!1;for(var n,r=t._a||t._c,e=0;r.length>e;)if(n=r[e++],n.fail||!T(n.promise))return!1;return!0},I=function(t){y.call(c,function(){var n;S?x.emit("rejectionHandled",t):(n=c.onrejectionhandled)&&n({promise:t,reason:t._v})})},k=function(t){var n=this;n._d||(n._d=!0,n=n._w||n,n._v=t,n._s=2,n._a||(n._a=n._c.slice()),A(n,!0))},L=function(t){var n,r=this;if(!r._d){r._d=!0,r=r._w||r;try{if(r===t)throw m("Promise can't be resolved itself");(n=P(t))?g(function(){var e={_w:r,_d:!1};try{n.call(t,f(L,e,1),f(k,e,1))}catch(t){k.call(e,t)}}):(r._v=t,r._s=1,A(r,!1))}catch(t){k.call({_w:r,_d:!1},t)}}};O||(w=function(t){v(this,w,b,"_h"),h(t),e.call(this);try{t(f(L,this,1),f(k,this,1))}catch(t){k.call(this,t)}},e=function(t){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1},e.prototype=r(73)(w.prototype,{then:function(t,n){var r=j(d(this,w));return r.ok="function"!=typeof t||t,r.fail="function"==typeof n&&n,r.domain=S?x.domain:void 0,this._c.push(r),this._a&&this._a.push(r),this._s&&A(this,!1),r.promise},catch:function(t){return this.then(void 0,t)}}),F=function(){var t=new e;this.promise=t,this.resolve=f(L,t,1),this.reject=f(k,t,1)}),s(s.G+s.W+s.F*!O,{Promise:w}),r(81)(w,b),r(74)(b),o=r(52)[b],s(s.S+s.F*!O,b,{reject:function(t){var n=j(this);return(0,n.reject)(t),n.promise}}),s(s.S+s.F*(u||!O),b,{resolve:function(t){if(t instanceof w&&E(t.constructor,this))return t;var n=j(this);return(0,n.resolve)(t),n.promise}}),s(s.S+s.F*!(O&&r(123)(function(t){w.all(t).catch(_)})),b,{all:function(t){var n=this,r=j(n),e=r.resolve,i=r.reject,o=M(function(){var r=[],o=0,u=1;p(t,!1,function(t){var c=o++,f=!1;r.push(void 0),u++,n.resolve(t).then(function(t){f||(f=!0,r[c]=t,--u||e(r))},i)}),--u||e(r)});return o&&i(o.error),r.promise},race:function(t){var n=this,r=j(n),e=r.reject,i=M(function(){p(t,!1,function(t){n.resolve(t).then(r.resolve,e)})});return i&&e(i.error),r.promise}})},function(t,n,r){var e=r(1),i=r(26),o=r(2),u=(r(3).Reflect||{}).apply,c=Function.apply;e(e.S+e.F*!r(4)(function(){u(function(){})}),"Reflect",{apply:function(t,n,r){var e=i(t),f=o(r);return u?u(e,n,f):c.call(e,n,f)}})},function(t,n,r){var e=r(1),i=r(70),o=r(26),u=r(2),c=r(6),f=r(4),a=r(163),s=(r(3).Reflect||{}).construct,l=f(function(){function t(){}return!(s(function(){},[],t)instanceof t)}),h=!f(function(){s(function(){})});e(e.S+e.F*(l||h),"Reflect",{construct:function(t,n){o(t),u(n);var r=arguments.length<3?t:o(arguments[2]);if(h&&!l)return s(t,n,r);if(t==r){switch(n.length){case 0:return new t;case 1:return new t(n[0]);case 2:return new t(n[0],n[1]);case 3:return new t(n[0],n[1],n[2]);case 4:return new t(n[0],n[1],n[2],n[3])}var e=[null];return e.push.apply(e,n),new(a.apply(t,e))}var f=r.prototype,v=i(c(f)?f:Object.prototype),p=Function.apply.call(t,v,n);return c(p)?p:v}})},function(t,n,r){var e=r(11),i=r(1),o=r(2),u=r(50);i(i.S+i.F*r(4)(function(){Reflect.defineProperty(e.f({},1,{value:1}),1,{value:2})}),"Reflect",{defineProperty:function(t,n,r){o(t),n=u(n,!0),o(r);try{return e.f(t,n,r),!0}catch(t){return!1}}})},function(t,n,r){var e=r(1),i=r(31).f,o=r(2);e(e.S,"Reflect",{deleteProperty:function(t,n){var r=i(o(t),n);return!(r&&!r.configurable)&&delete t[n]}})},function(t,n,r){"use strict";var e=r(1),i=r(2),o=function(t){this._t=i(t),this._i=0;var n,r=this._k=[];for(n in t)r.push(n)};r(139)(o,"Object",function(){var t,n=this,r=n._k;do{if(n._i>=r.length)return{value:void 0,done:!0}}while(!((t=r[n._i++])in n._t));return{value:t,done:!1}}),e(e.S,"Reflect",{enumerate:function(t){return new o(t)}})},function(t,n,r){var e=r(31),i=r(1),o=r(2);i(i.S,"Reflect",{getOwnPropertyDescriptor:function(t,n){return e.f(o(t),n)}})},function(t,n,r){var e=r(1),i=r(32),o=r(2);e(e.S,"Reflect",{getPrototypeOf:function(t){return i(o(t))}})},function(t,n,r){function e(t,n){var r,c,s=arguments.length<3?t:arguments[2];return a(t)===s?t[n]:(r=i.f(t,n))?u(r,"value")?r.value:void 0!==r.get?r.get.call(s):void 0:f(c=o(t))?e(c,n,s):void 0}var i=r(31),o=r(32),u=r(24),c=r(1),f=r(6),a=r(2);c(c.S,"Reflect",{get:e})},function(t,n,r){var e=r(1);e(e.S,"Reflect",{has:function(t,n){return n in t}})},function(t,n,r){var e=r(1),i=r(2),o=Object.isExtensible;e(e.S,"Reflect",{isExtensible:function(t){return i(t),!o||o(t)}})},function(t,n,r){var e=r(1);e(e.S,"Reflect",{ownKeys:r(177)})},function(t,n,r){var e=r(1),i=r(2),o=Object.preventExtensions;e(e.S,"Reflect",{preventExtensions:function(t){i(t);try{return o&&o(t),!0}catch(t){return!1}}})},function(t,n,r){var e=r(1),i=r(144);i&&e(e.S,"Reflect",{setPrototypeOf:function(t,n){i.check(t,n);try{return i.set(t,n),!0}catch(t){return!1}}})},function(t,n,r){function e(t,n,r){var f,h,v=arguments.length<4?t:arguments[3],p=o.f(s(t),n);if(!p){if(l(h=u(t)))return e(h,n,r,v);p=a(0)}return c(p,"value")?!(!1===p.writable||!l(v)||(f=o.f(v,n)||a(0),f.value=r,i.f(v,n,f),0)):void 0!==p.set&&(p.set.call(v,r),!0)}var i=r(11),o=r(31),u=r(32),c=r(24),f=r(1),a=r(66),s=r(2),l=r(6);f(f.S,"Reflect",{set:e})},function(t,n,r){var e=r(3),i=r(136),o=r(11).f,u=r(71).f,c=r(122),f=r(120),a=e.RegExp,s=a,l=a.prototype,h=/a/g,v=/a/g,p=new a(h)!==h;if(r(10)&&(!p||r(4)(function(){return v[r(7)("match")]=!1,a(h)!=h||a(v)==v||"/a/i"!=a(h,"i")}))){a=function(t,n){var r=this instanceof a,e=c(t),o=void 0===n;return!r&&e&&t.constructor===a&&o?t:i(p?new s(e&&!o?t.source:t,n):s((e=t instanceof a)?t.source:t,e&&o?f.call(t):n),r?this:l,a)};for(var d=u(s),y=0;d.length>y;)!function(t){t in a||o(a,t,{configurable:!0,get:function(){return s[t]},set:function(n){s[t]=n}})}(d[y++]);l.constructor=a,a.prototype=l,r(28)(e,"RegExp",a)}r(74)("RegExp")},function(t,n,r){r(119)("match",1,function(t,n,r){return[function(r){"use strict";var e=t(this),i=void 0==r?void 0:r[n];return void 0!==i?i.call(r,e):new RegExp(r)[n](String(e))},r]})},function(t,n,r){r(119)("replace",2,function(t,n,r){return[function(e,i){"use strict";var o=t(this),u=void 0==e?void 0:e[n];return void 0!==u?u.call(e,o,i):r.call(String(o),e,i)},r]})},function(t,n,r){r(119)("search",1,function(t,n,r){return[function(r){"use strict";var e=t(this),i=void 0==r?void 0:r[n];return void 0!==i?i.call(r,e):new RegExp(r)[n](String(e))},r]})},function(t,n,r){r(119)("split",2,function(t,n,e){"use strict";var i=r(122),o=e,u=[].push,c="split",f="length",a="lastIndex";if("c"=="abbc"[c](/(b)*/)[1]||4!="test"[c](/(?:)/,-1)[f]||2!="ab"[c](/(?:ab)*/)[f]||4!="."[c](/(.?)(.?)/)[f]||"."[c](/()()/)[f]>1||""[c](/.?/)[f]){var s=void 0===/()??/.exec("")[1];e=function(t,n){var r=String(this);if(void 0===t&&0===n)return[];if(!i(t))return o.call(r,t,n);var e,c,l,h,v,p=[],d=(t.ignoreCase?"i":"")+(t.multiline?"m":"")+(t.unicode?"u":"")+(t.sticky?"y":""),y=0,g=void 0===n?4294967295:n>>>0,b=new RegExp(t.source,d+"g");for(s||(e=new RegExp("^"+b.source+"$(?!\\s)",d));(c=b.exec(r))&&!((l=c.index+c[0][f])>y&&(p.push(r.slice(y,c.index)),!s&&c[f]>1&&c[0].replace(e,function(){for(v=1;v<arguments[f]-2;v++)void 0===arguments[v]&&(c[v]=void 0)}),c[f]>1&&c.index<r[f]&&u.apply(p,c.slice(1)),h=c[0][f],y=l,p[f]>=g));)b[a]===c.index&&b[a]++;return y===r[f]?!h&&b.test("")||p.push(""):p.push(r.slice(y)),p[f]>g?p.slice(0,g):p}}else"0"[c](void 0,0)[f]&&(e=function(t,n){return void 0===t&&0===n?[]:o.call(this,t,n)});return[function(r,i){var o=t(this),u=void 0==r?void 0:r[n];return void 0!==u?u.call(r,o,i):e.call(String(o),r,i)},e]})},function(t,n,r){"use strict";r(184);var e=r(2),i=r(120),o=r(10),u="toString",c=/./[u],f=function(t){r(28)(RegExp.prototype,u,t,!0)};r(4)(function(){return"/a/b"!=c.call({source:"a",flags:"b"})})?f(function(){var t=e(this);return"/".concat(t.source,"/","flags"in t?t.flags:!o&&t instanceof RegExp?i.call(t):void 0)}):c.name!=u&&f(function(){return c.call(this)})},function(t,n,r){"use strict";r(29)("anchor",function(t){return function(n){return t(this,"a","name",n)}})},function(t,n,r){"use strict";r(29)("big",function(t){return function(){return t(this,"big","","")}})},function(t,n,r){"use strict";r(29)("blink",function(t){return function(){return t(this,"blink","","")}})},function(t,n,r){"use strict";r(29)("bold",function(t){return function(){return t(this,"b","","")}})},function(t,n,r){"use strict";var e=r(1),i=r(147)(!1);e(e.P,"String",{codePointAt:function(t){return i(this,t)}})},function(t,n,r){"use strict";var e=r(1),i=r(16),o=r(148),u="endsWith",c=""[u];e(e.P+e.F*r(134)(u),"String",{endsWith:function(t){var n=o(this,t,u),r=arguments.length>1?arguments[1]:void 0,e=i(n.length),f=void 0===r?e:Math.min(i(r),e),a=String(t);return c?c.call(n,a,f):n.slice(f-a.length,f)===a}})},function(t,n,r){"use strict";r(29)("fixed",function(t){return function(){return t(this,"tt","","")}})},function(t,n,r){"use strict";r(29)("fontcolor",function(t){return function(n){return t(this,"font","color",n)}})},function(t,n,r){"use strict";r(29)("fontsize",function(t){return function(n){return t(this,"font","size",n)}})},function(t,n,r){var e=r(1),i=r(75),o=String.fromCharCode,u=String.fromCodePoint;e(e.S+e.F*(!!u&&1!=u.length),"String",{fromCodePoint:function(t){for(var n,r=[],e=arguments.length,u=0;e>u;){if(n=+arguments[u++],i(n,1114111)!==n)throw RangeError(n+" is not a valid code point");r.push(n<65536?o(n):o(55296+((n-=65536)>>10),n%1024+56320))}return r.join("")}})},function(t,n,r){"use strict";var e=r(1),i=r(148),o="includes";e(e.P+e.F*r(134)(o),"String",{includes:function(t){return!!~i(this,t,o).indexOf(t,arguments.length>1?arguments[1]:void 0)}})},function(t,n,r){"use strict";r(29)("italics",function(t){return function(){return t(this,"i","","")}})},function(t,n,r){"use strict";var e=r(147)(!0);r(140)(String,"String",function(t){this._t=String(t),this._i=0},function(){var t,n=this._t,r=this._i;return r>=n.length?{value:void 0,done:!0}:(t=e(n,r),this._i+=t.length,{value:t,done:!1})})},function(t,n,r){"use strict";r(29)("link",function(t){return function(n){return t(this,"a","href",n)}})},function(t,n,r){var e=r(1),i=r(30),o=r(16);e(e.S,"String",{raw:function(t){for(var n=i(t.raw),r=o(n.length),e=arguments.length,u=[],c=0;r>c;)u.push(String(n[c++])),c<e&&u.push(String(arguments[c]));return u.join("")}})},function(t,n,r){var e=r(1);e(e.P,"String",{repeat:r(149)})},function(t,n,r){"use strict";r(29)("small",function(t){return function(){return t(this,"small","","")}})},function(t,n,r){"use strict";var e=r(1),i=r(16),o=r(148),u="startsWith",c=""[u];e(e.P+e.F*r(134)(u),"String",{startsWith:function(t){var n=o(this,t,u),r=i(Math.min(arguments.length>1?arguments[1]:void 0,n.length)),e=String(t);return c?c.call(n,e,r):n.slice(r,r+e.length)===e}})},function(t,n,r){"use strict";r(29)("strike",function(t){return function(){return t(this,"strike","","")}})},function(t,n,r){"use strict";r(29)("sub",function(t){return function(){return t(this,"sub","","")}})},function(t,n,r){"use strict";r(29)("sup",function(t){return function(){return t(this,"sup","","")}})},function(t,n,r){"use strict";r(82)("trim",function(t){return function(){return t(this,3)}})},function(t,n,r){"use strict";var e=r(3),i=r(24),o=r(10),u=r(1),c=r(28),f=r(65).KEY,a=r(4),s=r(126),l=r(81),h=r(76),v=r(7),p=r(182),d=r(153),y=r(206),g=r(205),b=r(138),m=r(2),x=r(30),w=r(50),S=r(66),_=r(70),O=r(174),E=r(31),P=r(11),j=r(72),F=E.f,M=P.f,A=O.f,N=e.Symbol,T=e.JSON,I=T&&T.stringify,k="prototype",L=v("_hidden"),R=v("toPrimitive"),C={}.propertyIsEnumerable,D=s("symbol-registry"),U=s("symbols"),W=s("op-symbols"),G=Object[k],B="function"==typeof N,V=e.QObject,z=!V||!V[k]||!V[k].findChild,q=o&&a(function(){return 7!=_(M({},"a",{get:function(){return M(this,"a",{value:7}).a}})).a})?function(t,n,r){var e=F(G,n);e&&delete G[n],M(t,n,r),e&&t!==G&&M(G,n,e)}:M,K=function(t){var n=U[t]=_(N[k]);return n._k=t,n},J=B&&"symbol"==typeof N.iterator?function(t){return"symbol"==typeof t}:function(t){return t instanceof N},Y=function(t,n,r){return t===G&&Y(W,n,r),m(t),n=w(n,!0),m(r),i(U,n)?(r.enumerable?(i(t,L)&&t[L][n]&&(t[L][n]=!1),r=_(r,{enumerable:S(0,!1)})):(i(t,L)||M(t,L,S(1,{})),t[L][n]=!0),q(t,n,r)):M(t,n,r)},H=function(t,n){m(t);for(var r,e=g(n=x(n)),i=0,o=e.length;o>i;)Y(t,r=e[i++],n[r]);return t},$=function(t,n){return void 0===n?_(t):H(_(t),n)},X=function(t){var n=C.call(this,t=w(t,!0));return!(this===G&&i(U,t)&&!i(W,t))&&(!(n||!i(this,t)||!i(U,t)||i(this,L)&&this[L][t])||n)},Q=function(t,n){if(t=x(t),n=w(n,!0),t!==G||!i(U,n)||i(W,n)){var r=F(t,n);return!r||!i(U,n)||i(t,L)&&t[L][n]||(r.enumerable=!0),r}},Z=function(t){for(var n,r=A(x(t)),e=[],o=0;r.length>o;)i(U,n=r[o++])||n==L||n==f||e.push(n);return e},tt=function(t){for(var n,r=t===G,e=A(r?W:x(t)),o=[],u=0;e.length>u;)!i(U,n=e[u++])||r&&!i(G,n)||o.push(U[n]);return o};B||(N=function(){if(this instanceof N)throw TypeError("Symbol is not a constructor!");var t=h(arguments.length>0?arguments[0]:void 0),n=function(r){this===G&&n.call(W,r),i(this,L)&&i(this[L],t)&&(this[L][t]=!1),q(this,t,S(1,r))};return o&&z&&q(G,t,{configurable:!0,set:n}),K(t)},c(N[k],"toString",function(){return this._k}),E.f=Q,P.f=Y,r(71).f=O.f=Z,r(116).f=X,r(125).f=tt,o&&!r(69)&&c(G,"propertyIsEnumerable",X,!0),p.f=function(t){return K(v(t))}),u(u.G+u.W+u.F*!B,{Symbol:N});for(var nt="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),rt=0;nt.length>rt;)v(nt[rt++]);for(var nt=j(v.store),rt=0;nt.length>rt;)d(nt[rt++]);u(u.S+u.F*!B,"Symbol",{for:function(t){return i(D,t+="")?D[t]:D[t]=N(t)},keyFor:function(t){if(J(t))return y(D,t);throw TypeError(t+" is not a symbol!")},useSetter:function(){z=!0},useSimple:function(){z=!1}}),u(u.S+u.F*!B,"Object",{create:$,defineProperty:Y,defineProperties:H,getOwnPropertyDescriptor:Q,getOwnPropertyNames:Z,getOwnPropertySymbols:tt}),T&&u(u.S+u.F*(!B||a(function(){var t=N();return"[null]"!=I([t])||"{}"!=I({a:t})||"{}"!=I(Object(t))})),"JSON",{stringify:function(t){if(void 0!==t&&!J(t)){for(var n,r,e=[t],i=1;arguments.length>i;)e.push(arguments[i++]);return n=e[1],"function"==typeof n&&(r=n),!r&&b(n)||(n=function(t,n){if(r&&(n=r.call(this,t,n)),!J(n))return n}),e[1]=n,I.apply(T,e)}}}),N[k][R]||r(27)(N[k],R,N[k].valueOf),l(N,"Symbol"),l(Math,"Math",!0),l(e.JSON,"JSON",!0)},function(t,n,r){"use strict";var e=r(1),i=r(127),o=r(152),u=r(2),c=r(75),f=r(16),a=r(6),s=r(3).ArrayBuffer,l=r(146),h=o.ArrayBuffer,v=o.DataView,p=i.ABV&&s.isView,d=h.prototype.slice,y=i.VIEW,g="ArrayBuffer";e(e.G+e.W+e.F*(s!==h),{ArrayBuffer:h}),e(e.S+e.F*!i.CONSTR,g,{isView:function(t){return p&&p(t)||a(t)&&y in t}}),e(e.P+e.U+e.F*r(4)(function(){return!new h(2).slice(1,void 0).byteLength}),g,{slice:function(t,n){if(void 0!==d&&void 0===n)return d.call(u(this),t);for(var r=u(this).byteLength,e=c(t,r),i=c(void 0===n?r:n,r),o=new(l(this,h))(f(i-e)),a=new v(this),s=new v(o),p=0;e<i;)s.setUint8(p++,a.getUint8(e++));return o}}),r(74)(g)},function(t,n,r){var e=r(1);e(e.G+e.W+e.F*!r(127).ABV,{DataView:r(152).DataView})},function(t,n,r){r(55)("Float32",4,function(t){return function(n,r,e){return t(this,n,r,e)}})},function(t,n,r){r(55)("Float64",8,function(t){return function(n,r,e){return t(this,n,r,e)}})},function(t,n,r){r(55)("Int16",2,function(t){return function(n,r,e){return t(this,n,r,e)}})},function(t,n,r){r(55)("Int32",4,function(t){return function(n,r,e){return t(this,n,r,e)}})},function(t,n,r){r(55)("Int8",1,function(t){return function(n,r,e){return t(this,n,r,e)}})},function(t,n,r){r(55)("Uint16",2,function(t){return function(n,r,e){return t(this,n,r,e)}})},function(t,n,r){r(55)("Uint32",4,function(t){return function(n,r,e){return t(this,n,r,e)}})},function(t,n,r){r(55)("Uint8",1,function(t){return function(n,r,e){return t(this,n,r,e)}})},function(t,n,r){r(55)("Uint8",1,function(t){return function(n,r,e){return t(this,n,r,e)}},!0)},function(t,n,r){"use strict";var e=r(166);r(118)("WeakSet",function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}},{add:function(t){return e.def(this,t,!0)}},e,!1,!0)},function(t,n,r){"use strict";var e=r(1),i=r(117)(!0);e(e.P,"Array",{includes:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}}),r(78)("includes")},function(t,n,r){var e=r(1),i=r(143)(),o=r(3).process,u="process"==r(45)(o);e(e.G,{asap:function(t){var n=u&&o.domain;i(n?n.bind(t):t)}})},function(t,n,r){var e=r(1),i=r(45);e(e.S,"Error",{isError:function(t){return"Error"===i(t)}})},function(t,n,r){var e=r(1);e(e.P+e.R,"Map",{toJSON:r(165)("Map")})},function(t,n,r){var e=r(1);e(e.S,"Math",{iaddh:function(t,n,r,e){var i=t>>>0,o=n>>>0,u=r>>>0;return o+(e>>>0)+((i&u|(i|u)&~(i+u>>>0))>>>31)|0}})},function(t,n,r){var e=r(1);e(e.S,"Math",{imulh:function(t,n){var r=65535,e=+t,i=+n,o=e&r,u=i&r,c=e>>16,f=i>>16,a=(c*u>>>0)+(o*u>>>16);return c*f+(a>>16)+((o*f>>>0)+(a&r)>>16)}})},function(t,n,r){var e=r(1);e(e.S,"Math",{isubh:function(t,n,r,e){var i=t>>>0,o=n>>>0,u=r>>>0;return o-(e>>>0)-((~i&u|~(i^u)&i-u>>>0)>>>31)|0}})},function(t,n,r){var e=r(1);e(e.S,"Math",{umulh:function(t,n){var r=65535,e=+t,i=+n,o=e&r,u=i&r,c=e>>>16,f=i>>>16,a=(c*u>>>0)+(o*u>>>16);return c*f+(a>>>16)+((o*f>>>0)+(a&r)>>>16)}})},function(t,n,r){"use strict";var e=r(1),i=r(17),o=r(26),u=r(11);r(10)&&e(e.P+r(124),"Object",{__defineGetter__:function(t,n){u.f(i(this),t,{get:o(n),enumerable:!0,configurable:!0})}})},function(t,n,r){"use strict";var e=r(1),i=r(17),o=r(26),u=r(11);r(10)&&e(e.P+r(124),"Object",{__defineSetter__:function(t,n){u.f(i(this),t,{set:o(n),enumerable:!0,configurable:!0})}})},function(t,n,r){var e=r(1),i=r(176)(!0);e(e.S,"Object",{entries:function(t){return i(t)}})},function(t,n,r){var e=r(1),i=r(177),o=r(30),u=r(31),c=r(131);e(e.S,"Object",{getOwnPropertyDescriptors:function(t){for(var n,r=o(t),e=u.f,f=i(r),a={},s=0;f.length>s;)c(a,n=f[s++],e(r,n));return a}})},function(t,n,r){"use strict";var e=r(1),i=r(17),o=r(50),u=r(32),c=r(31).f;r(10)&&e(e.P+r(124),"Object",{__lookupGetter__:function(t){var n,r=i(this),e=o(t,!0);do{if(n=c(r,e))return n.get}while(r=u(r))}})},function(t,n,r){"use strict";var e=r(1),i=r(17),o=r(50),u=r(32),c=r(31).f;r(10)&&e(e.P+r(124),"Object",{__lookupSetter__:function(t){var n,r=i(this),e=o(t,!0);do{if(n=c(r,e))return n.set}while(r=u(r))}})},function(t,n,r){var e=r(1),i=r(176)(!1);e(e.S,"Object",{values:function(t){return i(t)}})},function(t,n,r){"use strict";var e=r(1),i=r(3),o=r(52),u=r(143)(),c=r(7)("observable"),f=r(26),a=r(2),s=r(68),l=r(73),h=r(27),v=r(79),p=v.RETURN,d=function(t){return null==t?void 0:f(t)},y=function(t){var n=t._c;n&&(t._c=void 0,n())},g=function(t){return void 0===t._o},b=function(t){g(t)||(t._o=void 0,y(t))},m=function(t,n){a(t),this._c=void 0,this._o=t,t=new x(this);try{var r=n(t),e=r;null!=r&&("function"==typeof r.unsubscribe?r=function(){e.unsubscribe()}:f(r),this._c=r)}catch(n){return void t.error(n)}g(this)&&y(this)};m.prototype=l({},{unsubscribe:function(){b(this)}});var x=function(t){this._s=t};x.prototype=l({},{next:function(t){var n=this._s;if(!g(n)){var r=n._o;try{var e=d(r.next);if(e)return e.call(r,t)}catch(t){try{b(n)}finally{throw t}}}},error:function(t){var n=this._s;if(g(n))throw t;var r=n._o;n._o=void 0;try{var e=d(r.error);if(!e)throw t;t=e.call(r,t)}catch(t){try{y(n)}finally{throw t}}return y(n),t},complete:function(t){var n=this._s;if(!g(n)){var r=n._o;n._o=void 0;try{var e=d(r.complete);t=e?e.call(r,t):void 0}catch(t){try{y(n)}finally{throw t}}return y(n),t}}});var w=function(t){s(this,w,"Observable","_f")._f=f(t)};l(w.prototype,{subscribe:function(t){return new m(t,this._f)},forEach:function(t){var n=this;return new(o.Promise||i.Promise)(function(r,e){f(t);var i=n.subscribe({next:function(n){try{return t(n)}catch(t){e(t),i.unsubscribe()}},error:e,complete:r})})}}),l(w,{from:function(t){var n="function"==typeof this?this:w,r=d(a(t)[c]);if(r){var e=a(r.call(t));return e.constructor===n?e:new n(function(t){return e.subscribe(t)})}return new n(function(n){var r=!1;return u(function(){if(!r){try{if(v(t,!1,function(t){if(n.next(t),r)return p})===p)return}catch(t){if(r)throw t;return void n.error(t)}n.complete()}}),function(){r=!0}})},of:function(){for(var t=0,n=arguments.length,r=Array(n);t<n;)r[t]=arguments[t++];return new("function"==typeof this?this:w)(function(t){var n=!1;return u(function(){if(!n){for(var e=0;e<r.length;++e)if(t.next(r[e]),n)return;t.complete()}}),function(){n=!0}})}}),h(w.prototype,c,function(){return this}),e(e.G,{Observable:w}),r(74)("Observable")},function(t,n,r){var e=r(54),i=r(2),o=e.key,u=e.set;e.exp({defineMetadata:function(t,n,r,e){u(t,n,i(r),o(e))}})},function(t,n,r){var e=r(54),i=r(2),o=e.key,u=e.map,c=e.store;e.exp({deleteMetadata:function(t,n){var r=arguments.length<3?void 0:o(arguments[2]),e=u(i(n),r,!1);if(void 0===e||!e.delete(t))return!1;if(e.size)return!0;var f=c.get(n);return f.delete(r),!!f.size||c.delete(n)}})},function(t,n,r){var e=r(185),i=r(161),o=r(54),u=r(2),c=r(32),f=o.keys,a=o.key,s=function(t,n){var r=f(t,n),o=c(t);if(null===o)return r;var u=s(o,n);return u.length?r.length?i(new e(r.concat(u))):u:r};o.exp({getMetadataKeys:function(t){return s(u(t),arguments.length<2?void 0:a(arguments[1]))}})},function(t,n,r){var e=r(54),i=r(2),o=r(32),u=e.has,c=e.get,f=e.key,a=function(t,n,r){if(u(t,n,r))return c(t,n,r);var e=o(n);return null!==e?a(t,e,r):void 0};e.exp({getMetadata:function(t,n){return a(t,i(n),arguments.length<3?void 0:f(arguments[2]))}})},function(t,n,r){var e=r(54),i=r(2),o=e.keys,u=e.key;e.exp({getOwnMetadataKeys:function(t){
return o(i(t),arguments.length<2?void 0:u(arguments[1]))}})},function(t,n,r){var e=r(54),i=r(2),o=e.get,u=e.key;e.exp({getOwnMetadata:function(t,n){return o(t,i(n),arguments.length<3?void 0:u(arguments[2]))}})},function(t,n,r){var e=r(54),i=r(2),o=r(32),u=e.has,c=e.key,f=function(t,n,r){if(u(t,n,r))return!0;var e=o(n);return null!==e&&f(t,e,r)};e.exp({hasMetadata:function(t,n){return f(t,i(n),arguments.length<3?void 0:c(arguments[2]))}})},function(t,n,r){var e=r(54),i=r(2),o=e.has,u=e.key;e.exp({hasOwnMetadata:function(t,n){return o(t,i(n),arguments.length<3?void 0:u(arguments[2]))}})},function(t,n,r){var e=r(54),i=r(2),o=r(26),u=e.key,c=e.set;e.exp({metadata:function(t,n){return function(r,e){c(t,n,(void 0!==e?i:o)(r),u(e))}}})},function(t,n,r){var e=r(1);e(e.P+e.R,"Set",{toJSON:r(165)("Set")})},function(t,n,r){"use strict";var e=r(1),i=r(147)(!0);e(e.P,"String",{at:function(t){return i(this,t)}})},function(t,n,r){"use strict";var e=r(1),i=r(46),o=r(16),u=r(122),c=r(120),f=RegExp.prototype,a=function(t,n){this._r=t,this._s=n};r(139)(a,"RegExp String",function(){var t=this._r.exec(this._s);return{value:t,done:null===t}}),e(e.P,"String",{matchAll:function(t){if(i(this),!u(t))throw TypeError(t+" is not a regexp!");var n=String(this),r="flags"in f?String(t.flags):c.call(t),e=new RegExp(t.source,~r.indexOf("g")?r:"g"+r);return e.lastIndex=o(t.lastIndex),new a(e,n)}})},function(t,n,r){"use strict";var e=r(1),i=r(181);e(e.P,"String",{padEnd:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0,!1)}})},function(t,n,r){"use strict";var e=r(1),i=r(181);e(e.P,"String",{padStart:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0,!0)}})},function(t,n,r){"use strict";r(82)("trimLeft",function(t){return function(){return t(this,1)}},"trimStart")},function(t,n,r){"use strict";r(82)("trimRight",function(t){return function(){return t(this,2)}},"trimEnd")},function(t,n,r){r(153)("asyncIterator")},function(t,n,r){r(153)("observable")},function(t,n,r){var e=r(1);e(e.S,"System",{global:r(3)})},function(t,n,r){for(var e=r(155),i=r(28),o=r(3),u=r(27),c=r(80),f=r(7),a=f("iterator"),s=f("toStringTag"),l=c.Array,h=["NodeList","DOMTokenList","MediaList","StyleSheetList","CSSRuleList"],v=0;v<5;v++){var p,d=h[v],y=o[d],g=y&&y.prototype;if(g){g[a]||u(g,a,l),g[s]||u(g,s,d),c[d]=l;for(p in e)g[p]||i(g,p,e[p],!0)}}},function(t,n,r){var e=r(1),i=r(151);e(e.G+e.B,{setImmediate:i.set,clearImmediate:i.clear})},function(t,n,r){var e=r(3),i=r(1),o=r(121),u=r(207),c=e.navigator,f=!!c&&/MSIE .\./.test(c.userAgent),a=function(t){return f?function(n,r){return t(o(u,[].slice.call(arguments,2),"function"==typeof n?n:Function(n)),r)}:t};i(i.G+i.B+i.F*f,{setTimeout:a(e.setTimeout),setInterval:a(e.setInterval)})},function(t,n,r){r(330),r(269),r(271),r(270),r(273),r(275),r(280),r(274),r(272),r(282),r(281),r(277),r(278),r(276),r(268),r(279),r(283),r(284),r(236),r(238),r(237),r(286),r(285),r(256),r(266),r(267),r(257),r(258),r(259),r(260),r(261),r(262),r(263),r(264),r(265),r(239),r(240),r(241),r(242),r(243),r(244),r(245),r(246),r(247),r(248),r(249),r(250),r(251),r(252),r(253),r(254),r(255),r(317),r(322),r(329),r(320),r(312),r(313),r(318),r(323),r(325),r(308),r(309),r(310),r(311),r(314),r(315),r(316),r(319),r(321),r(324),r(326),r(327),r(328),r(231),r(233),r(232),r(235),r(234),r(220),r(218),r(224),r(221),r(227),r(229),r(217),r(223),r(214),r(228),r(212),r(226),r(225),r(219),r(222),r(211),r(213),r(216),r(215),r(230),r(155),r(302),r(307),r(184),r(303),r(304),r(305),r(306),r(287),r(183),r(185),r(186),r(342),r(331),r(332),r(337),r(340),r(341),r(335),r(338),r(336),r(339),r(333),r(334),r(288),r(289),r(290),r(291),r(292),r(295),r(293),r(294),r(296),r(297),r(298),r(299),r(301),r(300),r(343),r(369),r(372),r(371),r(373),r(374),r(370),r(375),r(376),r(354),r(357),r(353),r(351),r(352),r(355),r(356),r(346),r(368),r(377),r(345),r(347),r(349),r(348),r(350),r(359),r(360),r(362),r(361),r(364),r(363),r(365),r(366),r(367),r(344),r(358),r(380),r(379),r(378),t.exports=r(52)},function(t,n){function r(t,n){if("string"==typeof n)return t.insertAdjacentHTML("afterend",n);var r=t.nextSibling;return r?t.parentNode.insertBefore(n,r):t.parentNode.appendChild(n)}t.exports=r},,,,,,,,,function(t,n,r){(function(n,r){!function(n){"use strict";function e(t,n,r,e){var i=n&&n.prototype instanceof o?n:o,u=Object.create(i.prototype),c=new p(e||[]);return u._invoke=s(t,r,c),u}function i(t,n,r){try{return{type:"normal",arg:t.call(n,r)}}catch(t){return{type:"throw",arg:t}}}function o(){}function u(){}function c(){}function f(t){["next","throw","return"].forEach(function(n){t[n]=function(t){return this._invoke(n,t)}})}function a(t){function n(r,e,o,u){var c=i(t[r],t,e);if("throw"!==c.type){var f=c.arg,a=f.value;return a&&"object"==typeof a&&m.call(a,"__await")?Promise.resolve(a.__await).then(function(t){n("next",t,o,u)},function(t){n("throw",t,o,u)}):Promise.resolve(a).then(function(t){f.value=t,o(f)},u)}u(c.arg)}function e(t,r){function e(){return new Promise(function(e,i){n(t,r,e,i)})}return o=o?o.then(e,e):e()}"object"==typeof r&&r.domain&&(n=r.domain.bind(n));var o;this._invoke=e}function s(t,n,r){var e=P;return function(o,u){if(e===F)throw new Error("Generator is already running");if(e===M){if("throw"===o)throw u;return y()}for(r.method=o,r.arg=u;;){var c=r.delegate;if(c){var f=l(c,r);if(f){if(f===A)continue;return f}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(e===P)throw e=M,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);e=F;var a=i(t,n,r);if("normal"===a.type){if(e=r.done?M:j,a.arg===A)continue;return{value:a.arg,done:r.done}}"throw"===a.type&&(e=M,r.method="throw",r.arg=a.arg)}}}function l(t,n){var r=t.iterator[n.method];if(r===g){if(n.delegate=null,"throw"===n.method){if(t.iterator.return&&(n.method="return",n.arg=g,l(t,n),"throw"===n.method))return A;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return A}var e=i(r,t.iterator,n.arg);if("throw"===e.type)return n.method="throw",n.arg=e.arg,n.delegate=null,A;var o=e.arg;return o?o.done?(n[t.resultName]=o.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=g),n.delegate=null,A):o:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,A)}function h(t){var n={tryLoc:t[0]};1 in t&&(n.catchLoc=t[1]),2 in t&&(n.finallyLoc=t[2],n.afterLoc=t[3]),this.tryEntries.push(n)}function v(t){var n=t.completion||{};n.type="normal",delete n.arg,t.completion=n}function p(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(h,this),this.reset(!0)}function d(t){if(t){var n=t[w];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,e=function n(){for(;++r<t.length;)if(m.call(t,r))return n.value=t[r],n.done=!1,n;return n.value=g,n.done=!0,n};return e.next=e}}return{next:y}}function y(){return{value:g,done:!0}}var g,b=Object.prototype,m=b.hasOwnProperty,x="function"==typeof Symbol?Symbol:{},w=x.iterator||"@@iterator",S=x.asyncIterator||"@@asyncIterator",_=x.toStringTag||"@@toStringTag",O="object"==typeof t,E=n.regeneratorRuntime;if(E)return void(O&&(t.exports=E));E=n.regeneratorRuntime=O?t.exports:{},E.wrap=e;var P="suspendedStart",j="suspendedYield",F="executing",M="completed",A={},N={};N[w]=function(){return this};var T=Object.getPrototypeOf,I=T&&T(T(d([])));I&&I!==b&&m.call(I,w)&&(N=I);var k=c.prototype=o.prototype=Object.create(N);u.prototype=k.constructor=c,c.constructor=u,c[_]=u.displayName="GeneratorFunction",E.isGeneratorFunction=function(t){var n="function"==typeof t&&t.constructor;return!!n&&(n===u||"GeneratorFunction"===(n.displayName||n.name))},E.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,c):(t.__proto__=c,_ in t||(t[_]="GeneratorFunction")),t.prototype=Object.create(k),t},E.awrap=function(t){return{__await:t}},f(a.prototype),a.prototype[S]=function(){return this},E.AsyncIterator=a,E.async=function(t,n,r,i){var o=new a(e(t,n,r,i));return E.isGeneratorFunction(n)?o:o.next().then(function(t){return t.done?t.value:o.next()})},f(k),k[_]="Generator",k.toString=function(){return"[object Generator]"},E.keys=function(t){var n=[];for(var r in t)n.push(r);return n.reverse(),function r(){for(;n.length;){var e=n.pop();if(e in t)return r.value=e,r.done=!1,r}return r.done=!0,r}},E.values=d,p.prototype={constructor:p,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=g,this.done=!1,this.delegate=null,this.method="next",this.arg=g,this.tryEntries.forEach(v),!t)for(var n in this)"t"===n.charAt(0)&&m.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=g)},stop:function(){this.done=!0;var t=this.tryEntries[0],n=t.completion;if("throw"===n.type)throw n.arg;return this.rval},dispatchException:function(t){function n(n,e){return o.type="throw",o.arg=t,r.next=n,e&&(r.method="next",r.arg=g),!!e}if(this.done)throw t;for(var r=this,e=this.tryEntries.length-1;e>=0;--e){var i=this.tryEntries[e],o=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=m.call(i,"catchLoc"),c=m.call(i,"finallyLoc");if(u&&c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(t,n){for(var r=this.tryEntries.length-1;r>=0;--r){var e=this.tryEntries[r];if(e.tryLoc<=this.prev&&m.call(e,"finallyLoc")&&this.prev<e.finallyLoc){var i=e;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=n&&n<=i.finallyLoc&&(i=null);var o=i?i.completion:{};return o.type=t,o.arg=n,i?(this.method="next",this.next=i.finallyLoc,A):this.complete(o)},complete:function(t,n){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&n&&(this.next=n),A},finish:function(t){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),v(r),A}},catch:function(t){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc===t){var e=r.completion;if("throw"===e.type){var i=e.arg;v(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:d(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=g),A}}}("object"==typeof n?n:"object"==typeof window?window:"object"==typeof self?self:this)}).call(n,function(){return this}(),r(158))}])</script><script src="/./main.0cf68a.js"></script><script>!function(){!function(e){var t=document.createElement("script");document.getElementsByTagName("body")[0].appendChild(t),t.setAttribute("src",e)}("/slider.e37972.js")}()</script>



<!--添加不蒜子统计脚本-->
<script  async  src="/busuanzi.pure.mini.js"></script>

<!--页面点击小红心-->
<script type="text/javascript" src="/clicklove.js"></script>


    
<div class="tools-col" q-class="show:isShow,hide:isShow|isFalse" q-on="click:stop(e)">
  <div class="tools-nav header-menu">
    
    
      
      
      
    
      
      
      
    
      
      
      
    
    

    <ul style="width: 70%">
    
    
      
      <li style="width: 33.333333333333336%" q-on="click: openSlider(e, 'innerArchive')"><a href="javascript:void(0)" q-class="active:innerArchive">所有文章</a></li>
      
        
      
      <li style="width: 33.333333333333336%" q-on="click: openSlider(e, 'friends')"><a href="javascript:void(0)" q-class="active:friends">友链</a></li>
      
        
      
      <li style="width: 33.333333333333336%" q-on="click: openSlider(e, 'aboutme')"><a href="javascript:void(0)" q-class="active:aboutme">个性签名</a></li>
      
        
    </ul>
  </div>
  <div class="tools-wrap">
    
    	<section class="tools-section tools-section-all" q-show="innerArchive">
        <div class="search-wrap">
          <input class="search-ipt" q-model="search" type="text" placeholder="find something…">
          <i class="icon-search icon" q-show="search|isEmptyStr"></i>
          <i class="icon-close icon" q-show="search|isNotEmptyStr" q-on="click:clearChose(e)"></i>
        </div>
        <div class="widget tagcloud search-tag">
          <p class="search-tag-wording">tag:</p>
          <label class="search-switch">
            <input type="checkbox" q-on="click:toggleTag(e)" q-attr="checked:showTags">
          </label>
          <ul class="article-tag-list" q-show="showTags">
             
              <li class="article-tag-list-item">
                <a href="javascript:void(0)" class="js-tag color4">二叉树</a>
              </li>
             
              <li class="article-tag-list-item">
                <a href="javascript:void(0)" class="js-tag color4">BFS</a>
              </li>
             
              <li class="article-tag-list-item">
                <a href="javascript:void(0)" class="js-tag color4">DFS</a>
              </li>
             
              <li class="article-tag-list-item">
                <a href="javascript:void(0)" class="js-tag color1">MySQL</a>
              </li>
             
              <li class="article-tag-list-item">
                <a href="javascript:void(0)" class="js-tag color3">pymysql</a>
              </li>
             
              <li class="article-tag-list-item">
                <a href="javascript:void(0)" class="js-tag color3">Cierra Runis</a>
              </li>
             
              <li class="article-tag-list-item">
                <a href="javascript:void(0)" class="js-tag color4">Overidea</a>
              </li>
             
              <li class="article-tag-list-item">
                <a href="javascript:void(0)" class="js-tag color5">Hexo</a>
              </li>
             
              <li class="article-tag-list-item">
                <a href="javascript:void(0)" class="js-tag color5">Hugo</a>
              </li>
             
              <li class="article-tag-list-item">
                <a href="javascript:void(0)" class="js-tag color5">WordPress</a>
              </li>
             
              <li class="article-tag-list-item">
                <a href="javascript:void(0)" class="js-tag color4">VuePress</a>
              </li>
             
              <li class="article-tag-list-item">
                <a href="javascript:void(0)" class="js-tag color4">Jekyllrb</a>
              </li>
             
              <li class="article-tag-list-item">
                <a href="javascript:void(0)" class="js-tag color3">Encrypt</a>
              </li>
             
              <li class="article-tag-list-item">
                <a href="javascript:void(0)" class="js-tag color3">hexo-deployer-git</a>
              </li>
             
              <li class="article-tag-list-item">
                <a href="javascript:void(0)" class="js-tag color4">busuanzi</a>
              </li>
             
              <li class="article-tag-list-item">
                <a href="javascript:void(0)" class="js-tag color2">Live2D</a>
              </li>
             
              <li class="article-tag-list-item">
                <a href="javascript:void(0)" class="js-tag color3">Coding Pages</a>
              </li>
             
              <li class="article-tag-list-item">
                <a href="javascript:void(0)" class="js-tag color2">Gitalk</a>
              </li>
             
              <li class="article-tag-list-item">
                <a href="javascript:void(0)" class="js-tag color4">Git</a>
              </li>
             
              <li class="article-tag-list-item">
                <a href="javascript:void(0)" class="js-tag color2">Github</a>
              </li>
             
              <li class="article-tag-list-item">
                <a href="javascript:void(0)" class="js-tag color1">Yilia</a>
              </li>
             
              <li class="article-tag-list-item">
                <a href="javascript:void(0)" class="js-tag color4">toc</a>
              </li>
             
              <li class="article-tag-list-item">
                <a href="javascript:void(0)" class="js-tag color2">Valine</a>
              </li>
             
              <li class="article-tag-list-item">
                <a href="javascript:void(0)" class="js-tag color2">ReadMe</a>
              </li>
             
              <li class="article-tag-list-item">
                <a href="javascript:void(0)" class="js-tag color4">SEO</a>
              </li>
             
              <li class="article-tag-list-item">
                <a href="javascript:void(0)" class="js-tag color3">SiteMap</a>
              </li>
             
              <li class="article-tag-list-item">
                <a href="javascript:void(0)" class="js-tag color2">Python</a>
              </li>
             
              <li class="article-tag-list-item">
                <a href="javascript:void(0)" class="js-tag color4">GIL</a>
              </li>
             
              <li class="article-tag-list-item">
                <a href="javascript:void(0)" class="js-tag color1">Log4j</a>
              </li>
             
              <li class="article-tag-list-item">
                <a href="javascript:void(0)" class="js-tag color5">BlueScreenView</a>
              </li>
             
              <li class="article-tag-list-item">
                <a href="javascript:void(0)" class="js-tag color3">ntoskrnl.exe</a>
              </li>
             
              <li class="article-tag-list-item">
                <a href="javascript:void(0)" class="js-tag color3">Node.js</a>
              </li>
             
              <li class="article-tag-list-item">
                <a href="javascript:void(0)" class="js-tag color3">MiniWeb</a>
              </li>
             
              <li class="article-tag-list-item">
                <a href="javascript:void(0)" class="js-tag color5">WSGI</a>
              </li>
             
              <li class="article-tag-list-item">
                <a href="javascript:void(0)" class="js-tag color1">route</a>
              </li>
             
              <li class="article-tag-list-item">
                <a href="javascript:void(0)" class="js-tag color3">logging</a>
              </li>
             
              <li class="article-tag-list-item">
                <a href="javascript:void(0)" class="js-tag color3">listdir</a>
              </li>
             
              <li class="article-tag-list-item">
                <a href="javascript:void(0)" class="js-tag color5">metaclass</a>
              </li>
             
              <li class="article-tag-list-item">
                <a href="javascript:void(0)" class="js-tag color4">ORM</a>
              </li>
             
              <li class="article-tag-list-item">
                <a href="javascript:void(0)" class="js-tag color3">closure</a>
              </li>
             
              <li class="article-tag-list-item">
                <a href="javascript:void(0)" class="js-tag color5">Decorator</a>
              </li>
             
              <li class="article-tag-list-item">
                <a href="javascript:void(0)" class="js-tag color4">Property</a>
              </li>
             
              <li class="article-tag-list-item">
                <a href="javascript:void(0)" class="js-tag color5">functools</a>
              </li>
             
              <li class="article-tag-list-item">
                <a href="javascript:void(0)" class="js-tag color4">Iterator</a>
              </li>
             
              <li class="article-tag-list-item">
                <a href="javascript:void(0)" class="js-tag color5">Generator</a>
              </li>
             
              <li class="article-tag-list-item">
                <a href="javascript:void(0)" class="js-tag color5">Coroutine</a>
              </li>
             
              <li class="article-tag-list-item">
                <a href="javascript:void(0)" class="js-tag color4">greenlet</a>
              </li>
             
              <li class="article-tag-list-item">
                <a href="javascript:void(0)" class="js-tag color2">gevent</a>
              </li>
             
              <li class="article-tag-list-item">
                <a href="javascript:void(0)" class="js-tag color2">urllib</a>
              </li>
             
              <li class="article-tag-list-item">
                <a href="javascript:void(0)" class="js-tag color4">MRO类搜索顺序</a>
              </li>
             
              <li class="article-tag-list-item">
                <a href="javascript:void(0)" class="js-tag color1">Excel</a>
              </li>
             
              <li class="article-tag-list-item">
                <a href="javascript:void(0)" class="js-tag color2">GIL全局锁</a>
              </li>
             
              <li class="article-tag-list-item">
                <a href="javascript:void(0)" class="js-tag color4">DeepCopy</a>
              </li>
             
              <li class="article-tag-list-item">
                <a href="javascript:void(0)" class="js-tag color5">ContextManager</a>
              </li>
             
              <li class="article-tag-list-item">
                <a href="javascript:void(0)" class="js-tag color4">OOP</a>
              </li>
            
            <div class="clearfix"></div>
          </ul>
        </div>
        <ul class="search-ul">
          <p q-show="jsonFail" style="padding: 20px; font-size: 12px;">
            缺失模块。<br/>1、请确保node版本大于6.2<br/>2、在博客根目录（注意不是yilia根目录）执行以下命令：<br/> npm i hexo-generator-json-content --save<br/><br/>
            3、在根目录_config.yml里添加配置：
<pre style="font-size: 12px;" q-show="jsonFail">
  jsonContent:
    meta: false
    pages: false
    posts:
      title: true
      date: true
      path: true
      text: false
      raw: false
      content: false
      slug: false
      updated: false
      comments: false
      link: false
      permalink: false
      excerpt: false
      categories: false
      tags: true
</pre>
          </p>
          <li class="search-li" q-repeat="items" q-show="isShow">
            <a q-attr="href:path|urlformat" class="search-title"><i class="icon-quo-left icon"></i><span q-text="title"></span></a>
            <p class="search-time">
              <i class="icon-calendar icon"></i>
              <span q-text="date|dateformat"></span>
            </p>
            <p class="search-tag">
              <i class="icon-price-tags icon"></i>
              <span q-repeat="tags" q-on="click:choseTag(e, name)" q-text="name|tagformat"></span>
            </p>
          </li>
        </ul>
    	</section>
    

    
    	<section class="tools-section tools-section-friends" q-show="friends">
  		
        <ul class="search-ul">
          
            <li class="search-li">
              <a href="http://mfln8n.coding-pages.com" target="_blank" class="search-title"><i class="icon-quo-left icon"></i>My Coding Pages</a>
            </li>
          
            <li class="search-li">
              <a href="https://kursaal.vip/" target="_blank" class="search-title"><i class="icon-quo-left icon"></i>不万能的杂货铺</a>
            </li>
          
            <li class="search-li">
              <a href="https://www.alankeene.com/" target="_blank" class="search-title"><i class="icon-quo-left icon"></i>三年二班陈同学</a>
            </li>
          
        </ul>
  		
    	</section>
    

    
    	<section class="tools-section tools-section-me" q-show="aboutme">
  	  	
  	  		<div class="aboutme-wrap" id="js-aboutme">&lt;font color=&#34;purple&#34; face=&#34;Microsoft YaHei&#34; size= 5&gt;&lt;b&gt;待到雄图卷毕 &amp;nbsp;&amp;nbsp;隐居山水里&lt;br&gt;坐看炊烟旖旎 &amp;nbsp;&amp;nbsp;浅池戏双鲤&lt;br&gt; &lt;/b&gt;&lt;/font&gt;</div>
  	  	
    	</section>
    
  </div>
  
</div>
    <!-- Root element of PhotoSwipe. Must have class pswp. -->
<div class="pswp" tabindex="-1" role="dialog" aria-hidden="true">

    <!-- Background of PhotoSwipe. 
         It's a separate element as animating opacity is faster than rgba(). -->
    <div class="pswp__bg"></div>

    <!-- Slides wrapper with overflow:hidden. -->
    <div class="pswp__scroll-wrap">

        <!-- Container that holds slides. 
            PhotoSwipe keeps only 3 of them in the DOM to save memory.
            Don't modify these 3 pswp__item elements, data is added later on. -->
        <div class="pswp__container">
            <div class="pswp__item"></div>
            <div class="pswp__item"></div>
            <div class="pswp__item"></div>
        </div>

        <!-- Default (PhotoSwipeUI_Default) interface on top of sliding area. Can be changed. -->
        <div class="pswp__ui pswp__ui--hidden">

            <div class="pswp__top-bar">

                <!--  Controls are self-explanatory. Order can be changed. -->

                <div class="pswp__counter"></div>

                <button class="pswp__button pswp__button--close" title="Close (Esc)"></button>

                <button class="pswp__button pswp__button--share" style="display:none" title="Share"></button>

                <button class="pswp__button pswp__button--fs" title="Toggle fullscreen"></button>

                <button class="pswp__button pswp__button--zoom" title="Zoom in/out"></button>

                <!-- Preloader demo http://codepen.io/dimsemenov/pen/yyBWoR -->
                <!-- element will get class pswp__preloader--active when preloader is running -->
                <div class="pswp__preloader">
                    <div class="pswp__preloader__icn">
                      <div class="pswp__preloader__cut">
                        <div class="pswp__preloader__donut"></div>
                      </div>
                    </div>
                </div>
            </div>

            <div class="pswp__share-modal pswp__share-modal--hidden pswp__single-tap">
                <div class="pswp__share-tooltip"></div> 
            </div>

            <button class="pswp__button pswp__button--arrow--left" title="Previous (arrow left)">
            </button>

            <button class="pswp__button pswp__button--arrow--right" title="Next (arrow right)">
            </button>

            <div class="pswp__caption">
                <div class="pswp__caption__center"></div>
            </div>

        </div>

    </div>

</div>
  </div>
  
  


<!--动态线条背景-->

    <script type="text/javascript" color="138,43,226" opacity="0.8" 
        zIndex="-1" count="168" 
        src="/canvas-nest.min.js">
    </script>


<!--雪花特效-->

  <script type="text/javascript" src="/snow.js"></script>
  <script type="text/javascript" src="/jquery-2.1.4.min.js"></script>
  <script>
    snow.down();
    $(window).resize(function() {
      $("canvas").css("z-index","500").remove();
      snow.down();
    });
  </script>
  
  
 <!-- 雪花特效2 -->
 
  
  
 <!--代码雨-->

  

<script src="//cdn.bootcss.com/highlight.js/9.2.0/highlight.min.js"></script>

<script>
    hljs.initHighlightingOnLoad();
</script>  
  
<script src="/live2dw/lib/L2Dwidget.min.js?094cbace49a39548bed64abff5988b05"></script><script>L2Dwidget.init({"pluginRootPath":"live2dw/","pluginJsPath":"lib/","pluginModelPath":"assets/","tagMode":false,"debug":false,"model":{"jsonPath":"/live2dw/assets/poi.model.json"},"display":{"position":"right","width":250,"height":300},"mobile":{"show":true,"scale":0.5},"react":{"opacityDefault":0.7,"opacityOnHover":0.8},"log":false});</script></body>
</html>



